tags:

views:

64

answers:

1

I'm having problems updating records to contain NULL values - in particular, a field which is of type Date.

I'm using prepared statements and I've tried the following:

// Fails
$value = NULL;

// Fails
$value = "";

// Fails
$value = "NULL";

all 3 of the above result in a date of 1969-12-31 being entered (0). How do I insert NULL values?

+1  A: 

Did you read the following question/answer: using nulls in a mysqli prepared statement

That seems to be the same issue. Correct me if I'm wrong?

Josh