And now it's time for Deep Thoughts with Jack Handy: I think a good gift for the President would be a chocolate revolver. And since he's so busy, you'd probably have to run up to him real quick and hand it to him.
<!----------------//------ andy matthews web developer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --------------//---------> -----Original Message----- From: Ray Champagne [mailto:[EMAIL PROTECTED] Sent: Thursday, April 20, 2006 10:44 AM To: CF-Talk Subject: Re: grouping by date Better. Firearms that shoot chocolate. mmmmm.....chocolate shooting firearms.....arrrrrgggghhhhh Andy Matthews wrote: > Wow... > > This list has given me so much, I'm just glad I could help out someone else. > > Got any chocolate or firearms in that closet? > > <!----------------//------ > andy matthews > web developer > ICGLink, Inc. > [EMAIL PROTECTED] > 615.370.1530 x737 > --------------//---------> > > -----Original Message----- > From: Ray Champagne [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 20, 2006 10:09 AM > To: CF-Talk > Subject: Re: grouping by date > > > Thanks everyone for the various solutions. > > My favorite was Andy's. Nice and clean, and minimal impact on the code > I had already written. > > Andy, you win your choice of prizes from our infamous prize closet! :) > > Andy Matthews wrote: >> SELECT year(date) as year, Month(date) as month, Day(date) as day >> FROM yourtable >> ORDER BY year, month, day >> >> then simply use the group attribute of cfoutput. >> >> <!----------------//------ >> andy matthews >> web developer >> ICGLink, Inc. >> [EMAIL PROTECTED] >> 615.370.1530 x737 >> --------------//---------> >> >> -----Original Message----- >> From: Ray Champagne [mailto:[EMAIL PROTECTED] >> Sent: Thursday, April 20, 2006 9:13 AM >> To: CF-Talk >> Subject: grouping by date >> >> >> I have an event table that I need to output the data in a specific >> fashion, based on dates, like so: >> >> April >> 19th >> event1 >> event2 >> event3 >> 26th >> event4 >> event5 >> 30th >> event6 >> event7 >> event8 >> May >> 1st >> event10 >> event11 >> 17th >> event12 >> >> June >> >> etc >> >> I have the date stored as a date type in the DB. What's the best way to >> go about outputting the events, grouped as above? I've come up with >> some elaborate workarounds, but they seem clunky and not very >> maintenance-friendly. >> >> For argument's sake, let's say the current select statement looks like > this: >> SELECT startdate, event_title >> FROM events >> WHERE active=1 >> ORDER BY startdate ASC >> >> Thanks, >> >> Ray >> >> >> >> > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238306 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54