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 Aktualisierungen per RSS | E-Mail Get updates via feedburner Get updates via twitter
Home / Coding / PHP / PHP Error: Call to a member … Home / Programmierung / PHP / PHP Error: Rufen Sie an ein Mitglied ...

PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Aufruf einer Member-Funktion fetch_assoc () auf einem Nicht-Objekt in

Posted on 23. Gesendet am 23. Jun, 2009 by Dragos in Coding , PHP Juni 2009 von Dragos in 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. Wenn Sie diese Fehlermeldung erhalten: Rufen Sie an ein Mitglied Funktion fetch_assoc () auf einem non-object in ..., bedeutet dies, dass Sie einen Fehler in Ihrer MySQL-Syntax haben. Supposing that $mysqli is your database connection object, put echo $mysqli->error; just before the line you're getting the error on. Angenommen, $ mysqli Ihre Datenbank-Connection-Objekt ist, setzen echo $ mysqli-> error; kurz vor der Zeile, die Sie über den Fehler bekommen sind.

 $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" Daten "von` this_table `WHERE` id `= 1 '); 
 echo $mysqli->error; //echoes that column `data` does not exist in table `this_table` echo $ mysqli-> error; / / Echos, die Spalte "Daten" nicht in der Tabelle gibt `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 (); / / gibt Fehler wie die Spalte "Daten" ist in der Tabelle `that_table", nicht in der Tabelle `this_table" 
 $mysqli->close(); $ mysqli-> close (); 
Translate this post Translate this post


Related posts: In Verbindung stehende Pfosten:

  1. Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: Leicht Reset "Mein Konto" Passwort mit MySQL und PHP
  2. Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Wie zum Benutzerprofil Daten mit SSI.php holen aus einer SMF-Forum Datenbank
  3. JavaScript: How to get the index (position within a group) of an object with jQuery? JavaScript: Wie in den Index zu erhalten (Position innerhalb einer Gruppe) eines Objekts mit jQuery?
  4. JavaScript: Send function as a parameter to another function (callbacks) JavaScript: Send-Funktion als Parameter an eine andere Funktion (Rückrufe)
  5. Ubuntu terminal: invalid host type && configure: error: can only configure for one host and one target at a time Ubuntu-Terminal: ungültigen Host-Typ & & configure: error: konfigurieren kann nur für einen Host und ein Ziel in einer Zeit,

  • Jenny Jenny
    Pretty nice post. Pretty nice Post. I just found your site and wanted to say Ich habe Ihre Website gefunden und wollte nur sagen,
    that I've really enjoyed reading your blog posts. dass ich es wirklich genossen Lesung Ihre Blog-Posts. Anyway Immerhin
    I'll be subscribing to your blog and I hope you write again soon! Ich werde Anmeldung zu Ihrem Blog und ich hoffe, du schreibst bald wieder!
blog comments powered by Disqus Blog-Kommentare powered by Disqus