|
Posted by Geoff Berrow on 06/07/07 23:01
Message-ID: <1181247194.230303.237710@q69g2000hsb.googlegroups.com> from
jsd219 contained the following:
>Thank you, i have one more question now. :-) i need to see the results
>from my table where column Category has anything in it. I am assuming
>i would use a WHERE statement but i don't know how to tell it to look
>for anything in the field.
Something like this:
$categories=array();
$sql="SELECT DISTINCT category FROM table WHERE category!=''";
$result=mysql_query($sql);
while($row=mysql_fetch_assoc($result)){
$categories[]=$row['category'];
}
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Navigation:
[Reply to this message]
|