[Wolves] Fwd: Fwd: mysql select help

Nigel R nigelren at yahoo.co.uk
Thu Mar 8 15:00:29 UTC 2012


You could use something like...
SELECT * FROM table WHERE TO_DAYS(col_name) = TO_DAYS(NOW())+1



>________________________________
> From: Wayne Morris <waynelists at machx.co.uk>
>To: Wolverhampton Linux User Group <wolves at mailman.lug.org.uk> 
>Sent: Thursday, 8 March 2012, 14:52
>Subject: Re: [Wolves] Fwd:  Fwd: mysql select help
> 
>On 08/03/2012 14:39, Mike Hingley wrote:
>> A cohort date sounds like duplication of data here.  I think the issue - the real issue might be using a timestamp rather than a date field.
>> 
>> How about using date_format to strip the time elrment, and group on that.
>> 
>> The advantage there is no schema change.
>> 
>Sorry, just checked my database and i was thinking of another field which was a timestamp - this is a simple 'date' field.
>
>cheers
>
>_______________________________________________
>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/705cc86b/attachment.htm>


More information about the Wolves mailing list