Re: [PHP] newbie php/mysql need help

2005-03-13 Thread Burhan Khalid
p80 wrote: I do a mysql request like this one: SELECT DISTINCT (brand), COUNT( brand )FROM `machines` where category like 'sold' group by brand" Try adding aliases to your query, such as : SELECT DISTINCT (brand), COUNT (brand) AS brand_count FROM `machines` WHERE `category` LIKE 'sold' GROUP BY

RE: [PHP] newbie php/mysql need help

2005-03-13 Thread Robbert van Andel
[1]}\n"; } -Original Message- From: p80 [mailto:[EMAIL PROTECTED] Sent: Sunday, March 13, 2005 4:35 PM To: php-general@lists.php.net Subject: [PHP] newbie php/mysql need help I do a mysql request like this one: SELECT DISTINCT (brand), COUNT( brand )FROM `machines` where category like

[PHP] newbie php/mysql need help

2005-03-13 Thread p80
I do a mysql request like this one: SELECT DISTINCT (brand), COUNT( brand )FROM `machines` where category like 'sold' group by brand" I get this from mysql: brand COUNT( brand) brandx4 brandy12 how can I echo this result in php? thanx in advance Pat -- P