[wplug] OT: Any MySQL gurus? Quick easy question..

Chris vze2f6h6 at verizon.net
Wed Jul 28 13:06:56 EDT 2004


> -----Original Message-----
> From: wplug-bounces+vze2f6h6=verizon.net at wplug.org 
> [mailto:wplug-bounces+vze2f6h6=verizon.net at wplug.org] On 
> Behalf Of techmike
> Sent: Wednesday, July 28, 2004 12:56 PM
> To: General user list
> Subject: Re: [wplug] OT: Any MySQL gurus? Quick easy question..
> 
> 
> Perfect!
> 
> I was kind of close I guess with my second effort..  I tried 
> AND, but I left out the column name and the 
> less-than-or-equal-to on the second half..  heh
> 
> Thanks!
> -Mike
> 
> -----Original Message-----
> From: Robert Dale <robdale at gmail.com>
> To: General user list <wplug at wplug.org>
> Date: Wed, 28 Jul 2004 12:44:27 -0400
> Subject: Re: [wplug] OT: Any MySQL gurus? Quick easy question..
> 
> > On Wed, 28 Jul 2004 12:28:39 -0400, techmike 
> > <mikeslists at access995.com>
> > wrote:
> > > How would I do this same query but return a month worth 
> of rows?  I
> > tried
> > > adding LIMIT 31, but no such luck..
> > > 
> > > SELECT *
> > >     FROM my_table
> > >     WHERE date = "03-01-04"
> > >     ORDER by date
> > 
> > in code, figure out the month's first and last day.
> > put those dates in the statement fragment below:
> > WHERE date >= "03-01-04" AND date <= "03-31-04"
> > 
> > (assuming MM-DD-YY format)
> > 
> > --
> > Robert Dale

Just a little tip.  When ever I am working with dates I try to use the
following format.
yyyymmdd

This makes searching a lot easier.  I ran into a few problems using
mm-dd-yy.  Now I just have a php function that will take a date from
either mm-dd-yy or mm-dd-yy and convert it to yyyymmdd and the other way
for displaying.

Chris Romano





More information about the wplug mailing list