WordPress MySQL SQL Query Error in WPDB Classワードプレスの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.ワードプレスのプラグインをユーザーまたは外部スクリプトの開発者がMySQLデータベースのクエリまたは操作を実行するため、すべてのデータベース操作のezSQLをベースにした関数のクラスのクラス$ wpdbを使用している上で問題が発生する場合があります。 $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 escapeおよびフラッシュします。 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サーバのバージョンに' 1行目ではASC post_dateによるLIMITの1 'の近くのORDERを使用するように対応するマニュアルをチェック]
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のSELECT番号、 post_titleからpost_date wp_posts > "とpost_date < '2006 - 08から28 9時03分57秒'とpost_status = ' 'とIDを公開! =のORDER BY post_dateはASC LIMITの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 )エンドとしてタイトル、 SUM秒(ライン4でソルのAS a.hits_reads ) ' ]
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 、時b.post_title NULLを包含'アリスのホーム'他の人(左b.post_title 、 60 )エンドとしてタイトル、並べ替え順序SUM ( a.hits_reads )はa.post_idを選択すると、 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 ) 、 ' ')のA S注記から左Bでw p_postsのJ OINw p_bstat_hits( a.post_id = b.ID )のWHERE bstat_date > '2006 - 08 - 03 ' GROUP BYの並べ替え順序のORDER BY DESCを制限5 a.post_id
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またはワードプレスのバージョンでは、単一引用符内の回避策や解像度( ' )として配置することができますを避けるためか、エラーの解決は、 $ post_idまたは$ IDまたは$投稿- > IDを使用よります。
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要 :これはマシンとして"保証なしにされている"提供されているページを翻訳しています。 Machine translation may be difficult to understand.機械翻訳を理解するのが難しい場合があります。 Please refer toを参照してください original English articleオリジナルの英語の記事 whenever possible.可能な場合。
Share and contribute or get technical support and help at共有して貢献するかを得る技術サポートと支援 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どのように新しいドメインまたは場所にワードプレスのブログを移動する
- 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は十分な値のエラー
- How to Delete Existing WordPress Post Revisions Stored/Saved既存のリビジョンを格納する方法ワードプレスの投稿を削除する/保存
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 4 WebサーバーをインストールするWindows XPでのApache2 、 PHP5のとMySQL4 -パート4
- 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 / TEXTカラムキー仕様のキーの長さで使用

































April 16th, 2007 22:11 4月16日2007 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も、最新バージョンへの移行は、地上に書き換えると、プラグインの再設計の基礎を築くことができます。
http://maisonbisson.com/blog/post/11613/