I have a code block like this ;
$a='';
$Query =$db->prepare("UPDATE TblUsers
SET Age = :age
WHERE
IsActive=1 ")
$Query->bindParam(":age",$a,PDO::PARAM_INT);
$Query->execute();
When i run this code i get this error ;
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'Age' at row 1'
But it will be nullable variable when i add '' . but i get this error. Where is my fail ?