sql - mysql select after where -
i have sql:
select count(*) table_a a, table_b b a.something=0 , b.active=1 , (select c.avg(rating) table_rating c c.id=a.id)>=$rating
this part doesn't seem work
and (select c.avg(rating) table_rating c c.id=a.id)>=$rating
how can fix it?
edit: problem here select c.avg(rating)
should select avg(rating)
try this
select count(*) table_a a, table_b b a.something=0 , b.active=1 , ( select avg(c.rating) table_rating c c.id=a.id ) >= $rating
Comments
Post a Comment