I`ve created this table in MySQL:
CREATE TABLE events (
id TINYINT PRIMARY KEY AUTO_INCREMENT,
title VARCHAR ( 15 ) NOT NULL,
description TEXT NOT NULL,
_type VARCHAR ( 15 ) NOT NULL,
date_time DATETIME NOT NULL,
location VARCHAR ( 15 ) NOT NULL
)ENGINE = INNODB;
Then i have inserted some records in the table,one of them has DATETIME field 2014-04-04 00:00:00. What i want is to search this record by it`s DATETIME field. For example:
SELECT * FROM events WHERE date_time = 2014-04-04;
But this query returns:
Empty set, 1 warning (0.00 sec)
Why this isn`t working?