Pak teda mi to na verzi 4.0.25 funguje dobře a jestli to tobě tak nejde, tak bych zkusil ten vstupní formát přeformátovat funkcí date_format() - viz odkaz v 352.
mysql> create table dt2 (datum datetime, t tinytext);
Query OK, 0 rows affected (0.33 sec)
mysql> insert into dt2 (datum, t) values ('2006-01-02 12:00', 'b');
Query OK, 1 row affected (0.27 sec)
mysql> insert into dt2 (datum, t) values ('2006-01-01 12:00', 'a');
Query OK, 1 row affected (0.00 sec)
mysql> select * from dt2;
+---------------------+------+
| datum | t |
+---------------------+------+
| 2006-01-02 12:00:00 | b |
| 2006-01-01 12:00:00 | a |
+---------------------+------+
2 rows in set (0.00 sec)
mysql> select * from dt2 where datum="20060101120000";
+---------------------+------+
| datum | t |
+---------------------+------+
| 2006-01-01 12:00:00 | a |
+---------------------+------+
1 row in set (0.00 sec)
mysql>
|