mysql中where错误_mysql – 多一个WHERE条件导致错误:您的SQL语法中有错误;

用户在尝试从'user_alerts'表中选取client_id匹配且read为0的记录时遇到了SQL语法错误。错误信息提示在查询的某一行存在错误。用户确认查询本身看起来没有问题,寻求帮助找出可能的错误或解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

好.每当我尝试在其中获得多个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查询没有任何问题.它应该工作,是否有人可以看到我写的错误?或者可以给出修复?

提前致谢!

编辑:

谢谢你给我的快速答案.反推功用了!多谢你们!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值