MySQL社区

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索

求助查询语法问题!求大腿帮忙

查看数: 2161 | 评论数: 2 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2013-6-4 16:55

正文摘要:

select * from p_ecms_movie where isgood=9 and classid='59' or classid='60' or classid='62' order by newstime desc limit 10复制代码明明已经用isgood=9查询了..可为什么还是能查询到isgood=0的数据..请问哪里 ...

回复

kider 发表于 2013-6-4 17:54:07
语句中没有括号,又有这么多or,当然了。
按照查询目的,适当加括号解决。

QQ|申请友链|小黑屋|Archiver|手机版|MySQL社区 ( 京ICP备07012489号   
联系人:周生; 联系电话:13911732319

GMT+8, 2024-6-26 19:15 , Processed in 0.137608 second(s), 29 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表