Reply to Re: Help with query - strange behaviour

Your name:

Reply:


Posted by J.O. Aho on 12/19/06 14:58

rukkie wrote:
> Some addition :
>
> the commands used in PHP to see the result are :
>
> while($nt=mysql_fetch_array($result5)){
> if ($nt[col1] <> "") {
you should use empty() and not <>


> As a result I fsee some double entries, which is not the idea .... Very
> strange behaviour or very stupid programming of me ?

>> I'm using this query :
>>
>> $query5="SELECT DISTINCT col1,col2 FROM db WHERE (col1<>\" \") ORDER BY
>> col1,col2 asc";

What about:
SELECT DISTINCT CONCAT(col1,col2) FROM db ORDER col1,col2 asc


--

//Aho

[Back to original 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

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