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


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to