WordPress MySQL SQL Query Error in WPDB Class WordPressのMySQLのSQLクエリにエラーが発生wpdbクラス
WordPress plug-ins users or external scripts developers may encounter problems on when trying to perform query or manipulation on MySQL database by using $wpdb class, a class of functions for all database manipulations based on the ezSQL. WordPressのプラグインのユーザや開発者が発生する問題を解決する外部スクリプトを実行しようとしたときにクエリまたはMySQLデータベースを使用して操作する$ wpdbクラスは、クラスの機能をezsqlに基づいて、すべてのデータベース操作します。 $wpdb Wordpress class provides easy way to access to database tables without the need to manually code the database connection syntax in PHP again. $ wpdb WordPressのクラスには、簡単な方法を使用するデータベースのテーブルへのアクセスを必要とせずに、データベースとの接続を手動でコードの構文はPHPてください。 $wpdb provides several functions to access, retrieve, select, delete, update or manipulate the data in the database such as query, get_var, get_row, get_col, get_results, escape, show_errors, hide_errors, get_col_info, and flush. $ wpdbは、いくつかの機能にアクセスする、取得、選択、削除、更新プログラムやデータベースのデータを操作するなど、クエリ、 get_var 、 get_row 、 get_col 、 get_results 、エスケープ、 show_errors 、 hide_errors 、 get_col_info 、およびフラッシュします。 When using these $wpdb to parse SQL statements as in plug-ins or external scripts or even Wordpress code itself the following error or similar error may appear. $ wpdbをパースするときに使用して、これらのSQLステートメントのようにプラグインまたは外部スクリプトまたはもWordPressのコード自体は、次のエラーが発生または同様のエラーが表示されます。
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY post_date ASC LIMIT 1' at line 1] WordPressのデータベースエラーが発生しました: [お持ちのSQL構文にエラーが発生して;チェックしているマニュアルをしてMySQLサーバのバージョンに対応して右側の構文を使用する付近' post_date昇順順限界1 'の行1 ]
SELECT ID, post_title FROM wp_posts WHERE post_date > ” AND post_date < '2006-08-28 09:03:57' AND post_status = 'publish' AND ID != ORDER BY post_date ASC LIMIT 1番号を選択し、 post_titleからwp_postsどこpost_date > "とpost_date < '2006 - 08〜28 9時03分57秒'とpost_status = '公開'と番号! =並び順post_date昇順限界1
or (the following from bsuite B2V6)または( bsuiteからは、次のb2v6 )
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’s pages’ ELSE LEFT(b.post_title, 60) END AS title, SUM(a.hits_reads) AS sor’ at line 4] WordPressのデータベースエラーが発生しました: [お持ちのSQL構文にエラーが発生して;チェックしているマニュアルをしてMySQLサーバのバージョンに対応して構文を使用する近くの右側のページの他の左の画像( b.post_title 、 60 )エンドとしてのタイトル、合計( a.hits_reads )としてソル'の行4 ]
SELECT a.post_id AS post_id, CASE WHEN b.post_title IS NULL THEN ‘Alice’s Home’ ELSE LEFT(b.post_title, 60) END AS title, SUM(a.hits_reads) AS sort_order, CONCAT(’Tot: ‘, FORMAT(SUM(a.hits_reads), 0), ‘, Avg: ‘, FORMAT((SUM(a.hits_reads)) / ((TO_DAYS(NOW()) post_id a.post_idとして選択し、ケースb.post_titleがnullのときに入力し、 'の国のアリスホーム'他の左の画像( b.post_title 、 60 )エンドとしてのタイトル、合計( a.hits_reads )として並べ替え、 concatは( '合計: ' 、形式(和( a.hits_reads ) 、 0 ) 、 ' 、平均: ' 、形式( (合計( a.hits_reads ) ) / ( ( to_days (今すぐ( ) )
- TO_DAYS(MIN(a.bstat_date))) + 1), 0), ‘, Max: ‘, FORMAT(MAX(a.hits_reads), 0), ‘’) AS note FROM wp_bstat_hits a LEFT JOIN wp_posts b ON (a.post_id = b.ID) WHERE bstat_date > ‘2006-08-03′ GROUP BY a.post_id ORDER BY sort_order DESC LIMIT 5 -t o_days(分( a .bstat_date) ) ) + 1 ) 、 0 ) 、 ' 、マックス: ' 、形式(最大( a .hits_reads) 、 0 ) 、 ' ')として参加w p_posts注:左からbをw p_bstat_hits( a.post_id = b.id )ここでbstat_date > '2006 - 08 - 03 'グループの表示順序を並べ替えa.post_id降順限界5
One of the reason for the errors is caused by post_ID or ID variable that represent the ID of the Wordpress post.その理由の1つのエラーが原因で発生post_idまたは番号を表す変数のidは、 WordPressのポストを作成。 Depending on which version of PHP, MySQL or WordPress you used, the $post_id or $id or $post->ID can be placed within single quote (’) as the workaround or resolution to avoid or solve the error.に応じて、どのバージョンのPHP 、 MySQLかのWordPressを使用すると、 $ $ post_idまたは郵便番号または$ - >番号に置かれることにシングルクオート( ' )としてこの問題を回避するか、または解決するために解決方法を避けるためにエラーが発生します。
IMPORTANT : You're reading a machine translated page which is provided "as is" without warranty. 重要:あなたが読んで、機械翻訳ページで提供"現状有姿"を保証します。 Unlike human translation, machine translation does not understand the grammar, semantics, syntax, idioms of natural language, thus often produce inaccurate and low quality text which is misleading and incomprehensible.とは異なり、人間の翻訳、機械翻訳の文法を理解していない、意味、構文、慣用句の自然言語は、このように頻繁に不正確な生産と低品質のテキストの上では誤解を招くとは理解し難いものです。 Thus, please refer toしたがって、参照してください。 original English articleオリジナルの英語記事索引 whenever possible.いつ可能です。
MDL blog postings now continue at今すぐブログ投稿を続けるmdl Tip and Trick ヒントとトリック , and readers are welcome to joinし、読者は歓迎に参加する My Digital Life Forums 私のデジタルライフフォーラム .です。
Related Articles関連記事
- Change or Set MySQL Long Query Time Value for log-slow-queries MySQLの長いクエリを変更または時間の値を設定することもできます。クエリが遅い
- Enable Logging of Slow Queries (Slow Query Log) in MySQL Databaseログを有効に遅いクエリ(スロークエリログ)にMySQLのデータベースの
- How to Move WordPress Blog to New Domain or Location WordPressのブログに移動する方法を新しいドメインまたは場所
- You Are Not Authorized to Execute SQL Queries in vBulletin MaintenanceあなたSQLクエリを実行する権限がありませんがメンテナンスvbulletin
- How to Customize, Modify or Change WordPress Database Connection Error Pageをカスタマイズする方法、修正、または変更WordPressのデータベースへの接続エラーページ
- Oracle PL/SQL ORA-00947 Not Enough Values Error OracleのPL / SQLのに十分な値エラーが発生しないのOra - 00947
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 4ウェブサーバーでは、 Windows XPをインストールするのApache2 、 PHP5とmysql4 -パート4
- PHP Fatal Error on Call to Add_Query_Var in Taxonomy.php After Upgrading to WordPress 2.5 RC2 (Excerpt) PHPの致命的なエラーが発生するtaxonomy.php不可add_query_varでWordPressの2.5にアップグレードした後RC2で(抜粋)
- ORA-01502 Oracle Index in Unusable StateメールORA - 01502 Oracleのインデックスを使用不能な状態に
- MySQL Error 1170 (42000): BLOB/TEXT Column Used in Key Specification Without a Key Length MySQLのエラーが発生1170 ( 42000 ) :のBLOB /テキスト列で使用されキー仕様なしでキーの長さ

































April 16th, 2007 22:11 2007年4月16日22:11
I’ve let these errors persist for way too long, but now they’re fixed along with a bunch of other bugs.私はこれらのエラーが続く道が長すぎますが、今彼らは固定と一緒に一束の他のバグです。
The latest version also lays the groundwork to transition to bsuite3, a ground-up rewrite and re-architecting of the plugin.また、最新のバージョンに移行するbsuite3を産むの基盤は、地上を書き換えると再architectingには、差込式です。
http://maisonbisson.com/blog/post/11613/