EDIT: Detailed description
Detailed Description:
*in table_a there are 100 members but only 50 of them have records in table_b and only 25 have records in table_b where approved = 1 THEREFORE the value I will need returned by the query is 25*
Hey everyone here is the query I am trying to resolve it will need to return a single result count so I can access with mysql_result($query, 0).
SELECT COUNT(id) FROM table_a WHERE (THIS IS WHERE I AM STUCK) I need to check if the( count of memberID in table_b WHERE memberID matching each id in table_a and approved in table_b = 1) - is greater than 1
The final result needs to be a count of the number of members that have an entry in table_b.
Sample of table columns that need to access
table_a ----------------- id table_b ------------------ id memberID approved Let me know if you need any more details.