WordPress MySQL SQL詢問錯誤在WPDB類
WordPress插入用戶或外部劇本開發商在MySQL數據庫時也許遇到問題在,當設法通過使用$wpdb類進行詢問或操作,作用類為根據ezSQL的所有數據庫操作。 $wpdb Wordpress類在PHP提供容易的方法訪問對數據庫表,不用需要再手工編碼數據庫連接句法。 $wpdb在數據庫提供幾個作用給通入,檢索,選擇,刪除,更新或者操作數據例如詢問, get_var, get_row、get_col、get_results、逃命、show_errors、hide_errors, get_col_info和充足。 當使用這$wpdb解析SQL聲明和在插入或外部劇本甚至Wordpress代碼時以下錯誤或相似的錯誤也許出現。
WordPress數據庫錯誤: [您有一個錯誤在您的SQL句法; 檢查對應於您的MySQL服務器版本為正確的句法於近用途『由post_date ASC極限1預定』在線1]的指南
選擇ID、post_title從wp_posts, post_date >」并且post_date <'2006-08-28 09:03:57' AND post_status='publish' AND ID !="ORDER" BY post_date ASC LIMIT 1
或(以下從bsuite B2V6)
WordPress數據庫錯誤: [您有一個錯誤在您的SQL句法; 檢查對應於您的MySQL服務器版本為正確的句法於近用途』 s呼叫』左的指南(b.post_title, 60)末端作為標題,總和(a.hits_reads)作為sor』在線4]
選擇a.post_id作為post_id,案件,當b.post_title是空然後`阿麗斯的家庭』左(b.post_title, 60)時末端作為標題,總和(a.hits_reads)作為sort_order, CONCAT (』小孩: `格式(總和(a.hits_reads), 0), `Avg : `格式((總和(a.hits_reads)) /((TO_DAYS (現在())
- TO_DAYS (分鐘(a.bstat_date))) + 1), 0), `最大: `、格式(MAX (a.hits_reads), 0), `』)作為筆記從wp_bstat_hits左邊由a.post_id命令加入wp_posts b在(a.post_id = b.ID) bstat_date > `2006-08-03 ′小組由sort_order DESC極限5的地方
一錯誤的原因是由代表Wordpress崗位的ID的post_ID或ID可變物造成的。 根據PHP的哪個版本、MySQL或者WordPress您使用了, $post_id或$id或者$post->ID可以在單引號之內被安置(』)作為解決方法或決議避免或解決錯誤。
重要: 這是現狀提供,不用保單的機器翻譯的頁。 計算機翻譯也許是難瞭解。 參見 原始的英國文章 每當可能。
分享并且貢獻或者得到技術支持并且幫助在 我的數字式生活論壇.
相關文章
- 改變或設置長的詢問時間值為日誌慢詢問的MySQL
- Enable Logging of Slow Queries (Slow Query Log) in MySQL Database
- How to Move WordPress Blog to New Domain or Location
- You Are Not Authorized to Execute SQL Queries in vBulletin Maintenance
- How to Customize, Modify or Change WordPress Database Connection Error Page
- Oracle PL/SQL ORA-00947 Not Enough Values Error
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 4
- How to Delete Existing WordPress Post Revisions Stored/Saved
- ORA-01502 Oracle Index in Unusable State
- MySQL Error 1170 (42000): BLOB/TEXT Column Used in Key Specification Without a Key Length

































April 16th, 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.
http://maisonbisson.com/blog/post/11613/