Re: [PHP] Crappy results from query

2004-02-18 Thread Ryan A
> > > $result=mysql_query("SELECT distinct(order_id),name,status,total FROM > > ". > $tcname."_h2o LIMIT $limit1, $limit2"); > > The distinct keyword applies to the whole row. Since you're including > other fields that will be different even though the name is the same, > MySQL does not consider t

Re: [PHP] Crappy results from query

2004-02-18 Thread Ryan A
On 2/18/2004 3:32:31 PM, Duncan Hill ([EMAIL PROTECTED]) wrote: > On Wednesday 18 February 2004 14:21, Ryan A wrote: > > Hey, > > Cant really understand this, can someone point out where I'm going wrong > > please? > > > > The idea is simple, I have 3+ names of clients in the database, each client

Re: [PHP] Crappy results from query

2004-02-18 Thread Stuart
Ryan A wrote: $result=mysql_query("SELECT distinct(order_id),name,status,total FROM ".$tcname."_h2o LIMIT $limit1, $limit2"); The distinct keyword applies to the whole row. Since you're including other fields that will be different even though the name is the same, MySQL does not consider them du