PHP Error: Call to a member function fetch_assoc() on a non-object in PHP error: Call to a member funkcija fetch_assoc () dėl ne daiktas
Posted on 23. Posted on 23. Jun, 2009 by Dragos in Coding , PHP Birželis, 2009 Dragos ir kodavimo, 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. Jei gaunate šį klaidos: Call to a member funkcija fetch_assoc () dėl ne daiktas ..., tai reiškia, kad turite savo mysql sintaksės klaida. Supposing that $mysqli is your database connection object, put echo $mysqli->error; just before the line you're getting the error on. Darant prielaidą, kad $ mysqli Jūsų ryšį su duomenų baze objektas, įdėti echo $ mysqli-> klaida; prieš linija gaunate klaidą.
$mysqli=new mysqli(HOST,USER,PASS,DB); $ mysqli = nauji mysqli (host, VARTOTOJUI, PASS, DB); $mQuery=$mysqli->query('select `data` from `this_table` where `id`=1'); $ mQuery = $ mysqli-> query ( "select` duomenys `nuo` this_table `kur` id `= 1"); echo $mysqli->error; //echoes that column `data` does not exist in table `this_table` echo $ mysqli-> error / / aidų, kad skiltyje "duomenys" neegzistuoja lentelėje "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 (); / / duoda klaidą skiltyje "duomenys" yra lentelėje "that_table", o ne lentele "this_table` $mysqli->close(); $ mysqli-> Close ();
Related posts: Related posts:
- Wordpress: Easily Reset Your Account Password Using MySQL and PHP WordPress: lengvai pakeisti slaptažodį sąskaitos naudojant MySQL ir PHP
- Coding:How to fetch user profile data with SSI.php from a SMF forum database Kodai: Kaip įkelti naudotojo profilį duomenų SSI.php iš SMF forumas duomenų
- JavaScript: How to get the index (position within a group) of an object with jQuery? JavaScript: Kaip gauti indeksą (pozicijos grupės) su jQuery objektas?
- JavaScript: Send function as a parameter to another function (callbacks) JavaScript: Siųsti funkcija kaip parametro kitos funkcijos (Atgalinės iššūkius)
- Ubuntu terminal: invalid host type && configure: error: can only configure for one host and one target at a time Ubuntu terminalas: Invalid tipas kompiuterio & & Configure: error: galite konfigūruoti tik vieną priimančiosios ir vieno tikslo ne laiku
- Jenny Jenny












































