开发者

Why is this mysql syntax wrong

I am executing the follow mysql query and getting error saying wrong syntax.

SELECT COUNT(*) FROM PS.INFO WHERE IPADDRESS='1.1.1.1' AND ID='YYY' AND (TYPE='PAID' 0R  TYPE='FREE') AND EXPIRYTIME IS NULL;

Please help me out with the correct s开发者_如何学编程yntax?


Your wrote 0R (zero-R) instead of OR (O-R).


TYPE='PAID' 0R TYPE='FREE'

OR 

appears to have a zero instead of an O


The error always tells you where to look. In this case it says "near '0R..."

And sure enough, that's a zero, not an O. It should be the word OR.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜