PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Call na člana funkcijo fetch_assoc () na non-predmeta
Posted on 23. Objavljeno dne 23. Jun, 2009 by Dragos in Coding , PHP Junij 2009, ki ga Dragos v Coding, 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. Če dobiš to napako: Pokliči, da funkcija člana fetch_assoc () na non-predmet ... to pomeni, da imate napako v vašem mysql sintaksi. Supposing that $mysqli is your database connection object, put echo $mysqli->error; just before the line you're getting the error on. Recimo, da je vaš $ mysqli povezave baze podatkov objekt, dana echo $ mysqli-> error; tik pred črto ste pridobivanje napake.
$mysqli=new mysqli(HOST,USER,PASS,DB); $ mysqli = new mysqli (HOST, USER, PASS, DB); $mQuery=$mysqli->query('select `data` from `this_table` where `id`=1'); mQuery $ = $ mysqli-> query ( "izberite" podatki "iz` this_table `ko` id `= 1 '); echo $mysqli->error; //echoes that column `data` does not exist in table `this_table` echo $ mysqli-> error; / / odmeva, da stolpec "podatkov" ne obstaja v tabeli `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 napake stolpcu "Podatki" se v tabeli "that_table", ni v tabeli `this_table` $mysqli->close(); $ mysqli-> close ();
Related posts: Podobni objav:
- Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: lahek Ponastavi geslo za svoj račun z uporabo MySQL in PHP
- Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Kako puščati podatkov uporabnikov profil z SSI.php iz baze foruma SMF
- JavaScript: How to get the index (position within a group) of an object with jQuery? JavaScript: Kako indeks (položaj v skupini) predmeta s jQuery?
- JavaScript: Send function as a parameter to another function (callbacks) JavaScript: Pošljite funkcijo kot parameter na drugo delovno mesto (callbacks)
- Ubuntu terminal: invalid host type && configure: error: can only configure for one host and one target at a time Ubuntu terminal: invalid vrsto gostitelja & & nastavite: error: lahko nastavite le za eno gostiteljice in en cilj v času
- Jenny Jenny












































