Posted by flamer die.spam@hotmail.com on 07/12/06 22:37
monomaniac21 wrote:
> heres the query im trying (well one variant):
>
> $result = mysql_query("SELECT name, id FROM tblproducts WHERE category
> = '$category_get' & name = DISTINCT ORDER BY name ASC LIMIT 0,8");
>
> also tried: "select distinct name, id.." to no avail...
>
>
> monomaniac21 wrote:
> > hi!
> >
> > is it possible to do the aforementioned query - selecting only distinct
> > in 1 col but retrieving all other cols at the same time.
> >
> > regards
> >
> > marc
what do you mean exactly?? you can do:
$result = mysql_query("SELECT * FROM tblproducts WHERE category
= '$category_get' & name = DISTINCT ORDER BY name ASC LIMIT 0,8");
that will select all the fields from each row that matches your where
clause..
Flamer.
[Back to original message]
|