This is a translated page. The original can be found here: http://iwebdevel.com/2009/06/23/php-error-call-to-a-member-function-fetch_assoc-on-a-non-object-in/
UPDATES VIA RSS | Email FRISSÍTÉSEK VIA RSS | E-mail Get updates via feedburner Get updates via twitter
Home / Coding / PHP / PHP Error: Call to a member … Home / Coding / PHP / PHP Error: Call to tagja ...

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 ();
Translate this post Translate this post


Related posts: Related posts:

  1. Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: Könnyen Reset Your Account jelszót a MySQL és a PHP
  2. 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
  3. 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?
  4. 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)
  5. 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
    Pretty nice post. Szép szép post. I just found your site and wanted to say Megtaláltam a webhelyét, és akartam mondani
    that I've really enjoyed reading your blog posts. , hogy én már nagyon élveztem olvasó-a blog posts. Anyway Mindenképp
    I'll be subscribing to your blog and I hope you write again soon! I'll be feliratkozást a blog, és remélem, hamarosan újra írsz!
blog comments powered by Disqus iPhone Disqus szerint