PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$sql = mysql_query("SELECT * FROM logis WHERE OrderNum ='$invoice' LIMIT 1");
$existCount = mysql_num_rows($sql);
//if Order Number does not exist add the file details into the table database
if ($existCount == 0)
{ echo "Order Number does not exist"; }
else if ($existCount > 0)
{ echo "Order Number exist"; }
I am 100% sure that the $invoice does not exist in the logis table and I keep getting "Order Number exist".
Thanks for your reply,
I just found the error, in my database the OrderNum should be an integer, and the $invoice I am passing has a letter R inside it after I took the Letter off it is working fine now.
Stupid me lool