I have a PHP script where I want to compare two numbers.
$usernumber = $_POST['usernumber'];
$sql = "SELECT password, isadmin, disabled FROM user WHERE usernumber = " . $usernumber .";";
Everything is working fine but there is one more or less cosmetic problem.
The usernumber is saved as a DECIMAL(5,0)
with ZEROFILL. If I compare 1
with 00001
it is true!
But is there also a possibility to compare these two with a SQL command so it is only true if they are really the same, like 00001
and 00001
?
In addition I do not have the possibilty to save it as a other datatype because I use other functions that need a number.