Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.
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;