php mysql update if else returns true always
<p>I have tried every example I could find to make this work correctly with no success. Seems easy enough, all i want is an error if the <code>$number</code> is not a value in the Tracking row.</p>

<pre><code>&lt;?php
mysql_connect("localhost", "user", "pass") or die("Connection Failed");
mysql_select_db("mydb") or die("Connection Failed");
$number = $_POST['number'];
$date = $_POST['datechange'];
$removed = $_POST['remover'];
$query = "UPDATE Custody SET DateOut = '$date' ,RemovedBy = '$removed' WHERE Tracking= '$number'";  
if (mysql_query($query)) {
    echo "updated";
} else {
    echo "fail";
}
?&gt;
</code></pre>
