好.每当我尝试在其中获得多个WHERE条件时,它只会给我一个SQL语法错误.
错误:
Error Executing Database Query.
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 'read = '0'' at line 3
Resources:
Enable Robust Exception Information to provide greater detail about the source of errors. In the Administrator, click Debugging & Logging > Debug Output Settings, and select the Robust Exception Information option.
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36
Remote Address ::1
Referrer
Date/Time 21-Oct-14 08:27 PM
SQL查询本身:
SELECT *
FROM user_alerts
WHERE client_id = '#clientUser.id#'
AND read = '0'
在我看来,SQL查询没有任何问题.它应该工作,是否有人可以看到我写的错误?或者可以给出修复?
提前致谢!
编辑:
谢谢你给我的快速答案.反推功用了!多谢你们!
用户在尝试从'user_alerts'表中选取client_id匹配且read为0的记录时遇到了SQL语法错误。错误信息提示在查询的某一行存在错误。用户确认查询本身看起来没有问题,寻求帮助找出可能的错误或解决方案。
4万+

被折叠的 条评论
为什么被折叠?



