
Originally Posted by
iansteeze
this gives me an error
sorry, my Microsoft® CrystalBall© is down at the moment, you're going to have to tell me what the error was
any anyhow, you should be doing it this way for the sake of performance:
Code:
SELECT canada
, COUNT(*) AS cnt
FROM phpbb_buysell
WHERE canada IN ('canada','usa','international')
GROUP
BY canada
and if those are the only 3 values for the canada column, then you can drop the WHERE clause
yes, it gives you three rows, but reformatting them into one line is a job for the front end application language, not SQL
Bookmarks