Problem with PHP and MySQL (mysql_query)
<p>i got a problem about an <code>if</code> condition. (mysql_query)
I verify in my database and if the <code>USER</code> don't exists it does the else condition. And that is not what i want. I want it to do the <code>error_type(...);</code> --> this function is a manual function that i create myself.
Which is: </p>

<pre><code>else{
  var_dump($response);
  mysql_query("DELETE FROM info_compte WHERE username      ='$user'");

  echo "&lt;pre&gt;";
      echo "L'utilisateur &lt;b&gt;".$user."&lt;/b&gt; a été supprimé avec succès!"; 
  echo "&lt;/pre&gt;";
}
</code></pre>

<p>Here is my complete function: (for the <code>error_type</code> i do the require at the beginning of the file)</p>

<pre><code>function db_delete($user, $site){

    $querycon = "SELECT username FROM info_compte WHERE username = '$user' AND siteWeb = '$site'";
    $response = mysql_query($querycon);

    if($response &gt; 0)
        error_type(6, $user,"");
    else {
        var_dump($response);
        mysql_query("DELETE FROM info_compte WHERE username ='$user'");
        echo "&lt;pre&gt;";
        echo "L'utilisateur &lt;b&gt;".$user."&lt;/b&gt; a été supprimé avec succès!"; 
        echo "&lt;/pre&gt;";
    }

}//db_delete
</code></pre>

<p>Thanks to all for your suggestion</p>
