strange query
| From: | pete M | Date: | Tue, 01 Jun 2004 15:09:29 +0000 |
| Subject: | strange query | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-34613@lists.php.net to get a copy of this message | ||
I'm running this query agains a mysql database, its a list of statuses with a joined table that shows the number of job in that status with more than 2. However I get the error
Unknown column 'c' in 'where clause'
select job_stats.job_stat_id, job_stat, job_stat_code,
count(works.job_stat_id) as c
from job_stats
inner join works on job_stats.job_stat_id = works.job_stat_id
where c > 2
group by job_stats.job_stat_id, job_stat, job_stat_code
order by job_stats.job_stat_order asc
Any idead anyone please
tia
pedro