I have two tables
USERS
ID,USERNAME,OPTIONS
--
ENTRIES
ID,ENTRYID,USER
--
<?PHP
$table = ENTRIES;
$sqlcount = "SELECT count(Distinct USER) AS COUNTUSERS FROM $table";
$rescount = @($sqlcount);
$rowcount = @mysql_fetch_row($rescount);
?>
What I need to be able to do... is count the number of users in the ENTRIES table (distinct)
but ONLY where the USER table in ENTRIES matches the USERNAME table in USERS - AND - the OPTIONS table in USERS equals "1"
Phew...
I can't wrap my head around this one and I don't know about about MySQL...
can anybody help with this? if it's even possible..
thanks!