Selecting empty mysql datetime fields

/ Published in: MySQL
Save to your folder(s)

The datetime_field value in the database is '0000-00-00 00:00:00'.

Copy this code and paste it in your HTML
  1. SELECT * FROM `table` WHERE UNIX_TIMESTAMP(`datetime_field`) = 0


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.