MYSQL/PHP How do I insert a null value?
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 inse开发者_如何转开发rt NULL values?
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?
精彩评论