這裏是我試圖在以下簡單DATE_SUB()MySQL查詢未能執行
SELECT p.*, c.* FROM `players` AS `p` INNER JOIN `price_checks` AS `c` ON `c`.`resourceId` = `p`.`Player_Resource` WHERE DATE(`c`.`timecheck`) = DATE(DATE_SUB(NOW() , INTERVAL 1 DAY) AND `p`.`Players_id` = '16892'
LIMIT 0, 25
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 'LIMIT 0, 25' at line 2
它只是執行無濟於事
SELECT
p.*, c.*
FROM
`players` AS `p`
INNER JOIN
`price_checks` AS `c`
ON
`c`.`resourceId` = `p`.`Player_Resource`
WHERE
DATE(`c`.`timecheck`) = DATE(DATE_SUB(NOW(), INTERVAL 1 DAY)
AND
`p`.`Players_id` = '16892'
我正在顯示錯誤的查詢說我正在附加一個LIMIT語法?任何理由爲什麼它可能會失敗?
它的可能性你是在錯誤的查詢:)。 MySQL沒有謊言,看看你有限制0,25的其他查詢。 –
我已經走了,並顯示通過phpMyAdmin – Curtis
@Curtis執行時引發的完整錯誤。 。 。你可以在'where子句'末尾加上分號嗎? –