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 Actualizări prin RSS | E-mail Get updates via feedburner Get updates via twitter
Home / Coding / PHP / PHP Error: Call to a member … Prima / codificare / PHP / PHP Error: apel la un membru ...

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 (); 
Translate this post Traduceţi acest post


Related posts: Legate de posturi:

  1. Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: resetată uşor Contul dvs. parolă, folosind PHP si MySQL
  2. 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
  3. 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?
  4. JavaScript: Send function as a parameter to another function (callbacks) JavaScript: Trimite funcţioneze ca un parametru de la o altă funcţie (Callbacks)
  5. 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
    Pretty nice post. Destul de frumos post. I just found your site and wanted to say Tocmai am găsit site-ul dvs. şi a vrut să spun
    that I've really enjoyed reading your blog posts. care le-am bucurat cu adevărat de lectură mesajele dumneavoastră blog. Anyway Oricum
    I'll be subscribing to your blog and I hope you write again soon! Voi fi abonaţi la blog-ul dvs. şi sper ca va scrie din nou în curând!
blog comments powered by Disqus comentarii blog-ul creat de Disqus