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
[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
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
3 matches
Mail list logo