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 Ažuriranja putem RSS | E-mail Get updates via feedburner Get updates via twitter
Home / Coding / PHP / PHP Error: Call to a member … Home / Kodiranje / PHP / PHP Error: Nazovite za člana ...

PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Poziv na funkciju člana fetch_assoc () na ne-objekt u

Posted on 23. Poslano na 23. Jun, 2009 by Dragos in Coding , PHP Jun, 2009 by Dragos u kodiranju, 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. Ako dobijete ovu grešku: Poziv na funkciju člana fetch_assoc () na ne-objekt u ..., to znači da imate grešku u svom MySQL sintaksu. Supposing that $mysqli is your database connection object, put echo $mysqli->error; just before the line you're getting the error on. $ Mysqli misleći da je vaša veza objekt baze podataka, stavite echo $ mysqli-> pogreške, neposredno prije linija ste uzimajući greška na.

$mysqli=new mysqli(HOST,USER,PASS,DB); $ mysqli = new mysqli (HOST, korisnik, PASS, DB);
$mQuery=$mysqli->query('select `data` from `this_table` where `id`=1'); mQuery $ = $ mysqli-> query ( 'odaberite `podataka iz` `` this_table gdje `id` = 1');
echo $mysqli->error; //echoes that column `data` does not exist in table `this_table` echo $ mysqli-> error; / / odjeci koji stupac 'podataka' ne postoji u tablici 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 (); / / daje pogrešku kao stupac 'podataka' je u tablici `that_table`, ne u tablici this_table ``
$mysqli->close(); $ mysqli-> close ();
Translate this post Translate this post


Related posts: Related posts:

  1. Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: Lako Reset Your account password Using MySQL i PHP
  2. Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Kako radi pristizanja podataka korisnik s SSI.php profil iz baze podataka SMF forum
  3. JavaScript: How to get the index (position within a group) of an object with jQuery? JavaScript: Kako biste dobili indeks (poziciju unutar grupe) s jQuery objekt?
  4. JavaScript: Send function as a parameter to another function (callbacks) JavaScript: Pošaljite funkcija kao parametar za druge funkcije (callbacks)
  5. Ubuntu terminal: invalid host type && configure: error: can only configure for one host and one target at a time Ubuntu terminal: Invalid host tip & konfigurirati: error: može konfigurirati samo za jednu domaćin i jedan cilja na vrijeme

  • Jenny Jenny
    Pretty nice post. Prilično lijep post. I just found your site and wanted to say JA pravedan postaviti svoje stranice i htio reći
    that I've really enjoyed reading your blog posts. da sam stvarno sam uživao čitajući tvoj blog posts. Anyway Svejedno
    I'll be subscribing to your blog and I hope you write again soon! Ja ću se pretplatite na svoj blog i nadam se da ste napisali opet uskoro!
blog comments powered by Disqus Blog komentari powered by Disqus