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 Aggiornamenti via RSS | Email Get updates via feedburner Get updates via twitter
Home / Coding / PHP / PHP Error: Call to a member … Home / Coding / PHP / PHP errore: Call to a member ...

PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Errore: Chiamata a una funzione membro fetch_assoc () su un non-oggetto in

Posted on 23. Posted on 23. Jun, 2009 by Dragos in Coding , PHP Giugno, 2009 da 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. Se viene visualizzato questo errore: Call to un membro funzione fetch_assoc () su un non-oggetto in ..., significa che c'è un errore nel vostro sintassi mysql. Supposing that $mysqli is your database connection object, put echo $mysqli->error; just before the line you're getting the error on. Supponendo che $ mysqli è l'oggetto di connessione al database, messo echo $ mysqli-> error; appena prima della linea che stai ricevendo l'errore su.

 $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'); $ mDomanda = $ mysqli-> query ( 'SELECT `dati` da `this_table` se `id` = 1'); 
 echo $mysqli->error; //echoes that column `data` does not exist in table `this_table` echo $ mysqli-> error; / / echi che i dati «colonna» non esiste nella tabella `this_table` 
 $row=$mQuery->fetch_assoc(); //gives error as the column `data` is in table `that_table`, not in table `this_table` $ row = $ mDomanda-> fetch_assoc (); / / dà errore come la colonna `dati` è in tabella `that_table`, non nella tabella `this_table` 
 $mysqli->close(); $ mysqli-> close (); 
Translate this post Traduci questo post


Related posts: Related posts:

  1. Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: Facilmente Reset Your Account password che utilizza MySQL e PHP
  2. Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Come recuperare i dati del profilo utente con SSI.php da un database forum SMF
  3. JavaScript: How to get the index (position within a group) of an object with jQuery? JavaScript: Come ottenere l'indice (posizione all'interno di un gruppo) di un oggetto con jQuery?
  4. JavaScript: Send function as a parameter to another function (callbacks) JavaScript: Invia funzione come parametro a un'altra funzione (callback)
  5. Ubuntu terminal: invalid host type && configure: error: can only configure for one host and one target at a time Terminale di Ubuntu: tipo di host non valido & & configure: error: può configurare solo per un host e un obiettivo alla volta

  • Jenny Jenny
    Pretty nice post. Post Pretty nice. I just found your site and wanted to say Ho appena trovato il tuo sito e volevo dire
    that I've really enjoyed reading your blog posts. che ho apprezzato molto leggere il tuo post sul blog. Anyway Comunque
    I'll be subscribing to your blog and I hope you write again soon! Sarò sottoscrizione al tuo blog e spero di scrivere di nuovo presto!
blog comments powered by Disqus commenti del blog powered by Disqus