How can I count all the rows from 2 tables where...
`approved` == '0'
?
You need to do an aggregate on a union:
select sum(subcount) as totalcount
from ( select count(*) as subcount from table1 where approved = 0
union
select count(*) as subcount from table2 where approved = 0 )
There are other ways but this shows your intent very clearly, especially naming the columns this way.
Hope this helps