Unknown column 'replies_count' in 'where clause'
select
`threads`.*,
(select count(*) from `replies` where `threads`.`id` = `replies`.`thread_id`) as `replies_count`
from
`threads`
where `replies_count` = 0
order by `created_at` desc;
推荐文章: