Re: strange query

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

 



doh !!!!!
thanks


Mikhail U. Petrov wrote:
Hi!
You should use
having c>2
instead of
where c>2.


Tuesday, June 1, 2004, 7:09:29 PM, pete wrote:


pM> I'm running this query agains a mysql database, its a list of statuses pM> with a joined table that shows the number of job in that status with pM> more than 2. However I get the error

pM> Unknown column 'c' in 'where clause'

pM> select  job_stats.job_stat_id, job_stat, job_stat_code,
pM> count(works.job_stat_id) as c
pM> from job_stats
pM> inner join works on job_stats.job_stat_id = works.job_stat_id
where c >> 2
pM> group by job_stats.job_stat_id, job_stat, job_stat_code
pM> order by job_stats.job_stat_order asc

pM> Any idead anyone please

pM> tia
pM> 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