All pastes #251087 Raw Edit

Something

public text v1 · immutable
#251087 ·published 2006-11-17 19:12 UTC
rendered paste body
Okay I have a hard time explaining this really quick so I am going to show my query and hopefully someone will understand what I am saying:

$query = mysql_query("SELECT * FROM members WHERE login = '$loginid' AND url = '$url'");

I want to check a row for the URL set in $url, where the login is the same as loginid. I pass these vars.

If there is NO result, do X
If there IS a result, do Y

That simple.

Anyone have any advice?