RE: [PHP] PHP and MySQL sorting using COUNT

2002-11-13 Thread Steve Edberg
Actually, using your original query and referring to $row['count(*)'] would work too. However, when using calculated fields I always use a column alias as Rich recommends - it makes things a lot clearer. -steve At 1:54 PM + 11/13/02, "Rich Gray" <[EMAIL PROTECTED]> wrote: try '... ,count

Re: [PHP] PHP and MySQL sorting using COUNT

2002-11-13 Thread @ Edwin
Hello, <[EMAIL PROTECTED]> wrote: > > I'm sorting records using COUNT with the following mysql command > > $result = mysql_query ("SELECT company_name, agent_name, count(*) FROM > $cur_listings GROUP BY company_name, agent_name"); > > Running this in MySQL does exactly what I need it to do but