Im trying to get the function below to return TRUE if it finds a matching row, and FALSE if it finds 0 rows.
function IsOpenEvent($id) {
$result = mysql_query("SELECT * FROM `events`
WHERE `access` = 'public'
AND `id` = '$id'
LIMIT 1")
or die(mysql_error());
if ($result) {
return TRUE;
} else {
return FALSE;
}
}