PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Call to a member function fetch_assoc () on a non-object in
Posted on 23. Posted on 23. Jun, 2009 by Dragos in Coding , PHP Június, 2009 Dragos a 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. Ha ezt error: Call to a member function fetch_assoc () on a non-object in ..., ez azt jelenti, hogy hiba történt a MySQL syntax. Supposing that $mysqli is your database connection object, put echo $mysqli->error; just before the line you're getting the error on. Feltételezve, hogy a $ mysqli is az adatbázis-kapcsolat objektumának, kimért echo $ mysqli-> hiba, csak a sor előtt kezded a hiba.
$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 ( 'select `data` a `this_table` ha `id` = 1'); echo $mysqli->error; //echoes that column `data` does not exist in table `this_table` echo $ mysqli-> error; / / kiírja, hogy az oszlop "adatok" nem létezik table `this_table` $row=$mQuery->fetch_assoc(); //gives error as the column `data` is in table `that_table`, not in table `this_table` $ sor = $ mQuery-> fetch_assoc (); / / hibát ad, mint az "adatok" oszlopban van a table `that_table", nem `table` this_table $mysqli->close(); $ mysqli-> close ();
Related posts: Related posts:
- Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: Könnyen Reset Your Account jelszót a MySQL és a PHP
- Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Hogyan lehet letölteni a felhasználói profil adatok SSI.php egy SMF fórum adatbázis
- JavaScript: How to get the index (position within a group) of an object with jQuery? JavaScript: Hogyan juthat az index (position csoportján belül) egy objektum jQuery?
- JavaScript: Send function as a parameter to another function (callbacks) JavaScript: Send függvény paraméterként egy másik funkció (visszahívások)
- Ubuntu terminal: invalid host type && configure: error: can only configure for one host and one target at a time Ubuntu terminál: érvénytelen host típus & & configure: error: csak beállítani egy fogadó és egy cél egy időben
- Jenny Állast nősténye












































