[Wolves] Fwd: mysql select help

Mike Hingley computa_mike at hotmail.com
Thu Mar 8 14:01:34 UTC 2012

I would suggest a query like this...
Select * from calendar where event-date between '2012-3-29 00:00:00' and '2012-03-29 23:59:59'

that should* show all the events for 29 March 2012.

Not sure that's the most efficient mechanism... group by might be more efficient. 

Does that help?

*syntax may not be 100% corect...may have to convert date string to a date.

----- Forwarded message -----
From: "Andy D'Arcy Jewell" <andy.jewell at sysmicro.co.uk>
Date: Thu, Mar 8, 2012 13:22
Subject: [Wolves] mysql select help
To: "Wolverhampton Linux User Group" <wolves at mailman.lug.org.uk>

On 08/03/12 13:11, Wayne Morris wrote:
> The problem is I don't know the next date (it is a timestamp) and I > don't want the stuff AFTER the date, its basically a simple
> calendar preview - your next day with stuff to do is this date, and > contains these items eg
> Fri 9th apples, pears , bananas
> tues 16th eggs, beans
> thurs 18th turkey, ham
> I just want to click and get "apples etc" if I click on thurs 8th., > and if clicked on sat 1Oth get eggs,beans, with your first I would get > all (as i do with current set up),
> or i'd need to put a date in a search box (which i've also got).
> cheers
Maybe the mysql date functions can help, particularly adddate():


Andy D'Arcy Jewell

SysMicro Limited
Linux Support
T:  0844 9918804
M:  07961605631
E:  andy.jewell at sysmicro.co.uk
W:  www.sysmicro.co.uk

Wolves LUG mailing list
Homepage: http://www.wolveslug.org.uk/
Mailing list: Wolves at mailman.lug.org.uk
Mailing list home: https://mailman.lug.org.uk/mailman/listinfo/wolves

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/wolves/attachments/20120308/08ff0996/attachment.htm>

More information about the Wolves mailing list