PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Poziv na funkciju člana fetch_assoc () na ne-objekt u
Posted on 23. Poslano na 23. Jun, 2009 by Dragos in Coding , PHP Jun, 2009 by Dragos u kodiranju, PHP
If you get this error: Call to a member function fetch_assoc() on a non-object in … , it means that you have an error in your mysql syntax. Ako dobijete ovu grešku: Poziv na funkciju člana fetch_assoc () na ne-objekt u ..., to znači da imate grešku u svom MySQL sintaksu. Supposing that $mysqli is your database connection object, put echo $mysqli->error; just before the line you're getting the error on. $ Mysqli misleći da je vaša veza objekt baze podataka, stavite echo $ mysqli-> pogreške, neposredno prije linija ste uzimajući greška na.
$mysqli=new mysqli(HOST,USER,PASS,DB); $ mysqli = new mysqli (HOST, korisnik, PASS, DB); $mQuery=$mysqli->query('select `data` from `this_table` where `id`=1'); mQuery $ = $ mysqli-> query ( 'odaberite `podataka iz` `` this_table gdje `id` = 1'); echo $mysqli->error; //echoes that column `data` does not exist in table `this_table` echo $ mysqli-> error; / / odjeci koji stupac 'podataka' ne postoji u tablici this_table `` $row=$mQuery->fetch_assoc(); //gives error as the column `data` is in table `that_table`, not in table `this_table` $ row = $ mQuery-> fetch_assoc (); / / daje pogrešku kao stupac 'podataka' je u tablici `that_table`, ne u tablici this_table `` $mysqli->close(); $ mysqli-> close ();
Related posts: Related posts:
- Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: Lako Reset Your account password Using MySQL i PHP
- Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Kako radi pristizanja podataka korisnik s SSI.php profil iz baze podataka SMF forum
- JavaScript: How to get the index (position within a group) of an object with jQuery? JavaScript: Kako biste dobili indeks (poziciju unutar grupe) s jQuery objekt?
- JavaScript: Send function as a parameter to another function (callbacks) JavaScript: Pošaljite funkcija kao parametar za druge funkcije (callbacks)
- Ubuntu terminal: invalid host type && configure: error: can only configure for one host and one target at a time Ubuntu terminal: Invalid host tip & konfigurirati: error: može konfigurirati samo za jednu domaćin i jedan cilja na vrijeme
- Jenny Jenny












































