Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $mysqli = new mysqli("adres bazy", "nazwauzytkownika", "haslo", "nazwa bazy danych");
- if($mysqli->connect_errno){
- die("blad polaczenia");
- }
- if($result = $mysqli->query("SELECT ...")){
- $liczba_wierszy = $result->num_rows;
- for($i = 0; $i < $liczba_wierszy; --$i){
- $res->data_seek($i);
- $row = $res->fetch_assoc();
- // tu masz do dyspozycji wiersz $row
- }
- $result->close();
- }
- $mysqli->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement