for the right syntax to use near ''X''問題解決

BUG:php

Error Number: 1064函數

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 ''4'' at line 1url

SELECT a.*,b.user_nickname, b.user_head_url from qk_user_album a, qk_user b where a.album_user_id = b.user_id ORDER BY a.album_create_date desc LIMIT 0, '4';spa

Filename: D:\DEV_PHP\WAMP\www\qk\system\database\DB_driver.phporm

Line Number: 330server


問題解決:字符串

這裏用到的是limit語法,兩個參數應該都是數字,不該該出現字符串it

查明的緣由是PHP傳遞參數的時候,第二參數沒有作轉換,加一個intval函數,字符串轉數字便可io

相關文章
相關標籤/搜索