Assume a MYSQL table, foo.
One column, bar datetime.
Two rows:
2004-01-01 08:00:00
2004-02-01 08:00:00
select * from foo where extract(day from bar)=1;
2 rows in set...
select * from foo where extract(month from bar)=2;
1 row in set...
select * from foo where extract(month from bar)=1 && extract(day from
bar)=1;
1 row in set...
select * from foo where extract(month from bar)=2 && extract(day from
bar)=1;
Empty set... SHOULD BE 1 ROW!!!
MySQL version 4.0.13, running on Windows 2000.
Am I doing something incredibly stupid, or does this just make no sense?
Thanks,
Don
One column, bar datetime.
Two rows:
2004-01-01 08:00:00
2004-02-01 08:00:00
select * from foo where extract(day from bar)=1;
2 rows in set...
select * from foo where extract(month from bar)=2;
1 row in set...
select * from foo where extract(month from bar)=1 && extract(day from
bar)=1;
1 row in set...
select * from foo where extract(month from bar)=2 && extract(day from
bar)=1;
Empty set... SHOULD BE 1 ROW!!!
MySQL version 4.0.13, running on Windows 2000.
Am I doing something incredibly stupid, or does this just make no sense?
Thanks,
Don
Comment