Selecting dates next to each other in Mysql -
been trying figure out while now.
i looking select rows database table in mysql 2 dates next each other.
e.g. 2011-07-20 next 2011-07-21.
many thanks
neil
i guess can join
using adddate()
:
select t1.id, t2.id mytable t1 inner join mytable t2 on t1.date = adddate(t2.date, -1) t1.id < t2.id;
the where
verify t1 , t2 don't contain duplicates.
Comments
Post a Comment