I have encountered a problem in PHP where if I use an integer as a parameter via prepared statements, it doesn't work - but if it is just pasted into the SQL string, it works perfectly.
For example, this will return an incorrect count (3):
$query = $pdo->prepare("SELECT count(*) FROM table WHERE x = :num");
$num = 1556555454;
$query->bindParam(":num", $num, PDO::PARAM_INT);
But this will return it perfectly fine, with the correct row count (2):
$query = $pdo->prepare("SELECT count(*) FROM table WHERE x = 1556555454");
As far as I'm aware, they should both work the exact same - but both queries return different results (ironically, the correct way is returning the incorrect answer).