strange query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux