|
Posted by Ian Davies on 07/28/06 14:38
mysql_query("SELECT a,b,c,d,e FROM my_table WHERE d!='0' && a='1' GROUP
BY b ORDER BY c DESC LIMIT 21");
Im no wizz kid but shouldnt it be
mysql_query("SELECT a,b,c,d,e FROM my_table WHERE d!='0' AND a='1' GROUP
BY b ORDER BY c DESC LIMIT 21");
notice the AND instead of &&
"Sutha Balasubramaniam" <suthab@gmail.com> wrote in message
news:1153146171.610867.236810@i42g2000cwa.googlegroups.com...
> Can someone please tell me what's wrong with this query?
>
> mysql_query("SELECT a,b,c,d,e FROM my_table WHERE d!='0' && a='1' GROUP
> BY b ORDER BY c DESC LIMIT 21");
>
> This returns nothing! Appreciate any helps.
>
Navigation:
[Reply to this message]
|