ThingEngineer / PHP-MySQLi-Database-Class

Wrapper for a PHP MySQL class, which utilizes MySQLi and prepared statements.
Other
3.3k stars 1.34k forks source link

How update column updateDate , value is null #1035

Open khanhnam99 opened 2 months ago

khanhnam99 commented 2 months ago

How update column updateDate , value is null

use mysql 8 Incorrect date value: '' for column 'updateDate ' at row 1

$data = [ 'updateDate ' => null ]; $db->update('TB_DISCOUNT', $data)

echo $db->getLastQuery();

// show query // UPDATE TB_DISCOUNT updateDate = 'NULL'

how show query result like this: UPDATE TB_DISCOUNT SET updateDate = NULL