hi
i have the scheduled_date column(datetime datatype) in message table.
i have the record having scheduled_date 2010-03-26 11:15:00.
but when i execute this query , empty result set is coming…
select * from messages where schedule_date>=‘2010-03-26 11:14:34’ and schedule_date<=‘2010-03-26 11:15:34’ AND status=‘3’ order by created_date
please help me urgent…
The problem is elsewhere (status?), as that query would match that row based on the date.
mysql> create table messages (schedule_date datetime);
Query OK, 0 rows affected (0.05 sec)
mysql> insert into messages (schedule_date) values ('2010-03-26 11:15:00');
Query OK, 1 row affected (0.00 sec)
mysql> select * from messages where schedule_date>='2010-03-26 11:14:34' and schedule_date<='2010-03-26 11:15:34';
+---------------------+
| schedule_date |
+---------------------+
| 2010-03-26 11:15:00 |
+---------------------+
1 row in set (0.00 sec)
hi
yes you are right,
i have tested removing status after posting the thread
thank u very much for immediate help