You are here: Re: mysql select group « PHP SQL « IT news, forums, messages
Re: mysql select group

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация