I have a form where the user enters an Invoice Number. I check the Database to see if this Invoice Number is already in the DB. If it is then i display an error message.. if not then it's supposed to add it to the DB.
$Sql = "SELECT InvoiceNum FROM tblBuildingInvoices WHERE InvoiceNum = '$InvoiceNum'";
$Result = mysql_query($Sql, $Connect);
If ($Result > 0) $Error .= "There has already been an invoice with that number added<br>";
My problem is this returns the error message even if there is no Invoice by that number....any idea why?
Thanks!😃