I have created a php page to update some data. While changing an integer or Date field value to NULL, the update query does not run fine. It still displays the old value instead of setting it to NULL. It doesn't work well with drop down lists also !
Code: Select all
$query = "UPDATE tbluserlist SET UserID = '$userid',
FirstName = '$fn',
LastName ='$ln' ,
Initials ='$initials',
BirthDate = '$birthdate',
WorkPhone = '$workphone',
DateOfHire = '$datehire', //date
Status='$status', // a drop down list
Extension='$extension',
AccruedSickTime = $accruedsicktime //integer
WHERE UserID ='$userid';";