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]
|