In PHP to check if a field from MySQL is null use the keyword is_null like: is_null($row[‘fld’]) In PHP to insert a Null value into MySQL field use the trick: $date = is_null($row[‘date’]) ? “null”: “‘” . $row[‘date’] “‘”; The following will not work: $date = is_null($row[‘date’]) ? NULL: “‘” . $row[‘date’] “‘”; This is