If it is a datetime string then I update a table like this:
$isReady = array[ "IsReady" ];
If it is a NULL value then I update a table like this:
UPDATE table SET IsReady = '$isReady' WHERE RecordID = 1;
They both work fine but is there a way to create a single SQL UPDATE statement to handle setting the field if the variable is either a datetime string or is NULL?
UPDATE table SET IsReady = NULL WHERE RecordID = 1;
From novice to tech pro — start learning today.