Sep 04
Black Night Lists Group consecutive days
Sep 04, 2013; 18:03
Black Night Lists
Group consecutive days
Hi
I need to be able to find all dates for a given enquiry and then group them together in order to populate fullcalendar.
enquiry_id Date_sort
1234 2013-09-08
1234 2013-09-17
1234 2013-09-21
1234 2013-09-23
1234 2013-09-24
1234 2013-09-26
These are all the dates found for the given enquiry. It then needs to group these up like this so :
Start : 2013-09-08 End : 2013-09-08
Start : 2013-09-17 End : 2013-09-21
Start : 2013-09-23 End : 2013-09-24
Start : 2013-09-26 End : 2013-09-26
Anyone doing something similar? I sort of have it working by checking if the second date = first + 1 day then end date = second date and repeat. This works for consecutive dates but my code fails to account for the days on their own so it becomes
Start : 2013-09-08 End : 2013-09-26
I am guessing there is an easier method using a MySQL statement which would group them up automatically, any pointers?.
Regards
Stephen
Black Night Software
http://www.blacknight.co.uk | http://blog.blacknight.co.uk
TEL : 0191 385 6720 | Skype : blacknightsoftware
Follow us on Twitter http://twitter.com/blacknightsw
LassoSoft Hosting Partner =95 Certified Lasso Developer
Regards
Stephen Thirlwell
Black Night Software
LassoSoft Hosting Partner =95 Certified Lasso Developer
http://www.blacknight.co.uk
#############################################################
Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso
Lasso@lists.lassosoft.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Sep 04
Jolle Carlestam Re: Group consecutive days
Sep 04, 2013; 17:15
Jolle Carlestam
Re: Group consecutive days
Sep 04
Black Night Lists Re: Group consecutive days
Sep 04, 2013; 18:27
Black Night Lists
Re: Group consecutive days
Sep 04
Ke Carlton Re: Group consecutive days
Sep 04, 2013; 19:03
Ke Carlton
Re: Group consecutive days
Sep 04
Black Night Lists Re: Group consecutive days
Sep 04, 2013; 20:17
Black Night Lists
Re: Group consecutive days
Sep 05
Ke Carlton Re: Group consecutive days
Sep 05, 2013; 00:02
Ke Carlton
Re: Group consecutive days
Sep 05
Johan Solve Re: Group consecutive days
Sep 05, 2013; 09:58
Johan Solve
Re: Group consecutive days
Sep 05
Bil Corry Re: Group consecutive days
Sep 05, 2013; 14:32
Bil Corry
Re: Group consecutive days
Sep 05
Dave Bruhn Re: Group consecutive days
Sep 05, 2013; 09:15
Dave Bruhn
Re: Group consecutive days
Sep 05
Black Night Lists Re: Group consecutive days
Sep 05, 2013; 15:24
Black Night Lists
Re: Group consecutive days
Sep 05
Black Night Lists Re: Group consecutive days
Sep 05, 2013; 15:30
Black Night Lists
Re: Group consecutive days
Sep 05
Black Night Lists Re: Group consecutive days
Sep 05, 2013; 15:34
Black Night Lists
Re: Group consecutive days