PHP SQL Syntax Check if theres a match
<p>I am trying to query the db in php and get if there is a match / success but it's not resulting in success although it should so I've thinking there's a syntax error?</p>

<p>Here is the code:</p>

<pre><code>if ($db_found) {
    $SQL = "SELECT * FROM wp_users where user_login='.$user.'";
    $result = mysql_query($SQL);

//Check if theres a match   
if $result &gt; 0 {
        echo 'There was a match';
    }               

    ...
}
</code></pre>
