PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Apel către un membru funcţie fetch_assoc () de pe un non-obiect în
Posted on 23. Postat la data de 23. Jun, 2009 by Dragos in Coding , PHP Iunie, 2009 de către Dragos în codificare a mărfurilor, 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. Dacă primiţi această eroare: Apel către un membru funcţie fetch_assoc () de pe un non-obiect în ..., aceasta înseamnă că aveţi o eroare în sintaxa MySQL. Supposing that $mysqli is your database connection object, put echo $mysqli->error; just before the line you're getting the error on. Presupunand ca $ mysqli este obiect de dumneavoastră în baza de date conexiune, pune echo $ mysqli-> de eroare; chiar înainte de linia de sunteţi achiziþie eroare pe.
$mysqli=new mysqli(HOST,USER,PASS,DB); mysqli $ = mysqli noi (gazdă, USER, PASS, DB); $mQuery=$mysqli->query('select `data` from `this_table` where `id`=1'); $ mQuery = $ mysqli-> query selectaţi ( "` date `de la` this_table `în cazul în care` id `= 1 '); echo $mysqli->error; //echoes that column `data` does not exist in table `this_table` echo $ mysqli-> de eroare; / / ecouri că coloana "date" nu exista in tabela `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 (); / / dă eroare ca coloana `de date` este în tabelul `that_table`, nu în tabelul `this_table` $mysqli->close(); $ mysqli-> close ();
Related posts: Legate de posturi:
- Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: resetată uşor Contul dvs. parolă, folosind PHP si MySQL
- Coding:How to fetch user profile data with SSI.php from a SMF forum database Codificare: Cum să-i aducă datele utilizatorului, cu profil de SSI.php de la o bază de date forum SMF
- JavaScript: How to get the index (position within a group) of an object with jQuery? JavaScript: Cum se ajunge indicele (poziţia în cadrul unui grup), de un obiect cu jQuery?
- JavaScript: Send function as a parameter to another function (callbacks) JavaScript: Trimite funcţioneze ca un parametru de la o altă funcţie (Callbacks)
- Ubuntu terminal: invalid host type && configure: error: can only configure for one host and one target at a time Ubuntu terminale: tip invalid gazdă & & configure: eroare: poate doar pentru a configura o gazdă şi un obiectiv de la un moment dat
- Jenny Jenny












































