Duncan Hill wrote:
On Tuesday 06 June 2006 15:38, [EMAIL PROTECTED] wrote:
Quoting Barry <[EMAIL PROTECTED]>:
Well my msql doesn't give me any errors using that query.
neither a warning.
Ditto.

usemysql> use test;
Database changed
mysql> CREATE TABLE a ( t TIMESTAMP );
Query OK, 0 rows affected (0.27 sec)

mysql> SELECT * FROM a WHERE t > '0001-01-01 00:00:00';
Empty set, 1 warning (0.21 sec)

mysql> show warnings;
+---------+------+-----------------------------------------------------------+
| Level   | Code | Message                                                   |
+---------+------+-----------------------------------------------------------+
| Warning | 1292 | Truncated incorrect datetime value: '0001-01-01 00:00:00' |
+---------+------+-----------------------------------------------------------+
----
Scanned by mailCritical.

Fails here, with no warnings however -- but we have an older 4.0.x version...
Wouldn't a DATETIME field be better used in this case?
When I use the same queries on a DATETIME field, this works ok.

Maybe there is some reason in a larger context that hasn't been explained yet....
--
Thanks,
James

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to