I am trying to quickly determine if a user_ID is the owner of a \'goal\'. I believe my SQL query is good, but I\'m trying to find a nice way of checking the result!
I like gbn's answer the best, but I wanted to point out that this:
if (@mysql_num_rows(mysql_query($query))!=1) { return false; } else { return true; }
can be simplified to:
return @mysql_num_rows(mysql_query($query)) == 1;