私のコードはすべて問題なく、最近私は(CakePhpを使用して構築された)Webアプリケーションでテストデータベースを読み込めませんでした。無効な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