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 ();
Related posts: In Verbindung stehende Pfosten:
- Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: Leicht Reset "Mein Konto" Passwort mit MySQL und PHP
- 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
- 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?
- JavaScript: Send function as a parameter to another function (callbacks) JavaScript: Send-Funktion als Parameter an eine andere Funktion (Rückrufe)
- 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












































