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アップデートのVIA のRSS | メール Get updates via feedburner Get updates via twitter
Home / Coding / PHP / PHP Error: Call to a member … ホーム / コーディング / はPHP / PHPのエラー:メンバへの電話...

PHP Error: Call to a member function fetch_assoc() on a non-object in PHPのエラー:メンバにFETCH_ASSOCは(非)上でオブジェクトの関数を呼び出します

Posted on 23. 23日に掲載した。 Jun, 2009 by Dragos in Coding , PHP 6月、2009 のコーディング 、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.もしこのエラーが出る:メンバーにコールFETCH_ASSOCは(非)上でオブジェクトを...、それはあなたのmysqlの構文エラーがあることを意味関数です。 Supposing that $mysqli is your database connection object, put echo $mysqli->error; just before the line you're getting the error on.は、$ mysqliのデータベース接続オブジェクトの場合、と仮定$ mysqliの、"エラーがエコー置くだけで前の行には上のエラーを取得しています。

 $mysqli=new mysqli(HOST,USER,PASS,DB); $ mysqliの=新しいmysqliの(ホスト名、ユーザ、パスは、DB); 
 $mQuery=$mysqli->query('select `data` from `this_table` where `id`=1'); `$からmQuery = $ mysqliの、"クエリ('を選択し、`データ`this_table`ここで`は`id = 1'); 
 echo $mysqli->error; //echoes that column `data` does not exist in table `this_table` "エラー$ mysqliのエコー/ /エコーは、その列`データ`表の`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は(); / /`テーブルにある`テーブル`、ないthat_table`this_table`列`データとしてエラーを出します。 
 $mysqli->close(); $ mysqliの、"閉じる(); 
Translate this post翻訳は、このポスト


Related posts:関連記事:

  1. Wordpress: Easily Reset Your Account Password Using MySQL and PHP ワードプレス:簡単にあなたのアカウントのパスワードをMySQLとPHPを使用してリセット
  2. Coding:How to fetch user profile data with SSI.php from a SMF forum database 符号化:どのようにSMFのフォーラムのデータベースからSSI.phpを持つユーザープロファイルデータをフェッチする
  3. JavaScript: How to get the index (position within a group) of an object with jQuery? JavaScriptを:どのようにjQueryを使ってオブジェクトの(位置はグループ内)のインデックスを取得する?
  4. JavaScript: Send function as a parameter to another function (callbacks) JavaScriptを:別の関数(コールバック)へのパラメータとして関数を送る
  5. Ubuntu terminal: invalid host type && configure: error: can only configure for one host and one target at a time Ubuntuの端末:無効なホストタイプ&構成:エラー:することができます一度に1つのホストと1つのターゲットのみを設定する

  • Jenny ジェニー
    Pretty nice post.かなりいいポスト。 I just found your site and wanted to say私はちょうどあなたのサイトを発見し、言いたいこと
    that I've really enjoyed reading your blog posts.私が本当にあなたのブログの記事を読み楽しんできた。 Anywayとにかく
    I'll be subscribing to your blog and I hope you write again soon!私はあなたのブログを購読することだろうと私はすぐに再度書き込みを期待!
blog comments powered by Disqus ブログのコメントディスカスによって供給さ