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ĠĠORNAMENTI VIA RSS | Email Get updates via feedburner Get updates via twitter
Home / Coding / PHP / PHP Error: Call to a member … Home / Kodifika / PHP / PHP Error: Sejħa għal membru ...

PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Sejħa għal membru funzjoni fetch_assoc () fuq bażi non-oġġett fil -

Posted on 23. Posted on 23. Jun, 2009 by Dragos in Coding , PHP Ġunju, 2009 minn Dragos fl-Kodifika, 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. Jekk ikollok dan l-iżball: Sejħa għal membru funzjoni fetch_assoc () fuq bażi non-oġġett fil ..., dan ifisser li għandek żball fil-sintassi mysql tiegħek. Supposing that $mysqli is your database connection object, put echo $mysqli->error; just before the line you're getting the error on. $ Mysqli jekk jitqies li huwa oġġett tiegħek konnessjoni database, ippreżentati eku $ mysqli-> żball; eżatt qabel il-linja int jkollna l-iżball fuq.

$mysqli=new mysqli(HOST,USER,PASS,DB); mysqli $ = mysqli ġodda (HOST, QED JAGĦMEL UŻU MINNU, PASS, DB);
$mQuery=$mysqli->query('select `data` from `this_table` where `id`=1'); $ mQuery = $ mysqli-> query ( "jagħżel" data "mill` this_table "fejn" id = "1");
echo $mysqli->error; //echoes that column `data` does not exist in table `this_table` eku $ mysqli-> iżball; / / itenni li "data kolonna" ma teżistix fit-tabella "this_table`
$row=$mQuery->fetch_assoc(); //gives error as the column `data` is in table `that_table`, not in table `this_table` ringiela $ = $ mQuery-> fetch_assoc (); / / tagħti żball bħala l-kolonna "data" tiġi fit-tabella "that_table", mhux fit-tabella "this_table`
$mysqli->close(); $ mysqli->-qrib ();
Translate this post Ittraduċi din il-kariga


Related posts: Related postijiet:

  1. Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: Faċli Reset Your Account Password użu MySQL u PHP
  2. Coding:How to fetch user profile data with SSI.php from a SMF forum database Kodifika: Kif jġibu profil utent tad-data ma SSI.php minn database forum SMF
  3. JavaScript: How to get the index (position within a group) of an object with jQuery? JavaScript: Kif tista 'tikseb l-indiċi (il-pożizzjoni fi ħdan grupp) ta' oġġett jQuery?
  4. JavaScript: Send function as a parameter to another function (callbacks) JavaScript: Send funzjoni bħala parametru ieħor għall-funzjoni (callbacks)
  5. Ubuntu terminal: invalid host type && configure: error: can only configure for one host and one target at a time Terminal Ubuntu: tip ospitanti invalida & kkonfigurat: żball: jista 'biss jiġi kkonfigurat għal waħda ospitanti u mira waħda fi żmien

  • Jenny Jenny
    Pretty nice post. Pretty post sbieħ. I just found your site and wanted to say I biss misjuba sit tiegħek u riedu jgħidu
    that I've really enjoyed reading your blog posts. li stajt verament jgawdu qari postijiet blog tiegħek. Anyway Hekk jew hekk
    I'll be subscribing to your blog and I hope you write again soon! I'll jiġu sottoskritti għal blog tiegħek u nispera li int tikteb mill-ġdid hekk!
blog comments powered by Disqus blog kummenti powered by Disqus