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 Posodobitev prek RSS | Email Get updates via feedburner Get updates via twitter
Home / Coding / PHP / PHP Error: Call to a member … Domov / Coding / PHP / PHP Error: Call na člana ...

PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Call na člana funkcijo fetch_assoc () na non-predmeta

Posted on 23. Objavljeno dne 23. Jun, 2009 by Dragos in Coding , PHP Junij 2009, ki ga Dragos v 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. Če dobiš to napako: Pokliči, da funkcija člana fetch_assoc () na non-predmet ... to pomeni, da imate napako v vašem mysql sintaksi. Supposing that $mysqli is your database connection object, put echo $mysqli->error; just before the line you're getting the error on. Recimo, da je vaš $ mysqli povezave baze podatkov objekt, dana echo $ mysqli-> error; tik pred črto ste pridobivanje napake.

$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 ( "izberite" podatki "iz` this_table `ko` id `= 1 ');
echo $mysqli->error; //echoes that column `data` does not exist in table `this_table` echo $ mysqli-> error; / / odmeva, da stolpec "podatkov" ne obstaja v tabeli `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 napake stolpcu "Podatki" se v tabeli "that_table", ni v tabeli `this_table`
$mysqli->close(); $ mysqli-> close ();
Translate this post Prevedi to post


Related posts: Podobni objav:

  1. Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: lahek Ponastavi geslo za svoj račun z uporabo MySQL in PHP
  2. Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Kako puščati podatkov uporabnikov profil z SSI.php iz baze foruma SMF
  3. JavaScript: How to get the index (position within a group) of an object with jQuery? JavaScript: Kako indeks (položaj v skupini) predmeta s jQuery?
  4. JavaScript: Send function as a parameter to another function (callbacks) JavaScript: Pošljite funkcijo kot parameter na drugo delovno mesto (callbacks)
  5. Ubuntu terminal: invalid host type && configure: error: can only configure for one host and one target at a time Ubuntu terminal: invalid vrsto gostitelja & & nastavite: error: lahko nastavite le za eno gostiteljice in en cilj v času

  • Jenny Jenny
    Pretty nice post. Precej lepo mesto. I just found your site and wanted to say Pravkar sem našel vašo stran in hotel povedati
    that I've really enjoyed reading your blog posts. da sem pošteno uživati čitanje vaš blog delovnih mest. Anyway Kakorkoli že
    I'll be subscribing to your blog and I hope you write again soon! Bom lahko naročijo na vaš blog in upam, da napišete spet kmalu!
blog comments powered by Disqus blog comments powered by Disqus