幾周前我的代碼一切正常,但最近我一直無法加載我的測試數據庫在我的web應用程序(使用CakePhp構建)。無效的SQL語法錯誤
這是錯誤:
Warning (512): SQL Error: 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 ') LEFT JOIN
blogs
ASBlog
ON (Song
.blog_id
=Blog
.id
) WHERE 1 = 1' at line 1 [CORE/cake/libs/model/datasources/dbo_source.php, line 684]
SELECT COUNT(*) AS `count`
FROM `songs` AS `Song`
LEFT JOIN libraries AS `Library` ON (`Song`.`id` = `Library`.`song_id` AND `Library`.`user_id` =)
LEFT JOIN `blogs` AS `Blog` ON (`Song`.`blog_id` = `Blog`.`id`)
WHERE 1 = 1
Warning (512): SQL Error: 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 ') WHERE 1 = 1 ORDER BY
Song
.postdate
desc LIMIT 100' at line 1 [CORE/cake/libs/model/datasources/dbo_source.php, line 684]
SELECT *, Blog.id
FROM `songs` AS `Song`
LEFT JOIN libraries AS `Library` ON (`Song`.`id` = `Library`.`song_id` AND `Library`.`user_id` =)
WHERE 1 = 1
ORDER BY `Song`.`postdate` DESC
LIMIT 100