RE: [PHP] PHP and MySQL sorting using COUNT

2002-11-13 Thread Steve Edberg
PROTECTED]> wrote: try '... ,count(*) as count ...' then you should be able to reference it as $row['count'] HTH Rich -Original Message- From: [EMAIL PROTECTED] [mailto:ed@;home.homes2see.com] Sent: 13 November 2002 13:44 To: [EMAIL PROTECTED] Subject: [PHP] PHP and MySQL so

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

[PHP] PHP and MySQL sorting using COUNT

2002-11-13 Thread ed
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 how do I echo the COUNT portion of the array? I k