Because you are selecting everything from that table and not those specific vars, the match isn't done so
PHP Code:
if (SQL_NumResults(Query) < 1)
will not work, try to select only what you need from that table and btw the most used format is where x = '%s' AND y = '%s' so try to use it in this way..