X was a loop counter i.e. it loops through all the days of any month, then
shows lists underneath customers with that birthday.

> So whats the X? All the other value syou pull out of Q_Date
> 
> 
> <cfquery name=3D"GetDOBs" datasource=3D"mydata">
>               SELECT  CustID, First,  Other, Sur, Bx_DOB
>               FROM    YESCustomer
>               WHERE   Year(Bx_DOB) < #Year(Q_Date)#
>                       AND     Day(Bx_DOB) =3D #X#
>                       AND     Month(Bx_DOB) =3D #Month(Q_Date)#
>               ORDER BY Year(Bx_DOB)
> </cfquery>
> 
> -----Original Message-----
> From: Andrew Dickinson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 11 December 2003 1:31 PM
> To: CFAussie Mailing List
> Subject: [cfaussie] Re: Slight OT : MySQL WHERE weirdness
> 
> 
> > did you try the doco's??
> 
> Yes (by websearches at least), and get conflicting info. But most of =
> them
> list Day,Month,Year as valid functions.
> =20
> > Code sample?
> 
> <cfquery name=3D"GetDOBs" datasource=3D"mydata">
>               SELECT  CustID, First,  Other, Sur, Bx_DOB
>               FROM    YESCustomer
>               WHERE   Year(Bx_DOB) < #Year(Q_Date)#
>                       AND     Day(Bx_DOB) =3D #X#
>                       AND     Month(Bx_DOB) =3D #Month(Q_Date)#
>               ORDER BY Year(Bx_DOB)
> </cfquery>
> 
> This one is a birthday finder. That is, input the day of the month
> and find customers whose birthdays are on that day.
> 
> The code then loops through the days of a month, in order to display
> a list of customers for each birthday, and enable links from
> each particular birthday.
> 
> This is mainly why the date is being split up into Day/Month/Year.
> 
> =20
> > -----Original Message-----
> > From: Andrew Dickinson [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, 11 December 2003 1:21 PM
> > To: CFAussie Mailing List
> > Subject: [cfaussie] Re: Slight OT : MySQL WHERE weirdness
> >=20
> >=20
> > Sorry guys, I've just tried datepart as well, and get the same error =
> =3D
> > (i.e.
> > invalid mysql syntax).
> >=20
> > > I am not sure that MySQL supports the Year, Month, Day functions.  I =
> =3D
> > think
> > > you have to use something like DatePart.
> > >=3D20
> > > CAVEAT: this is totally from memory and I didn't check the manuals.
> > >=3D20
> > >=3D20
> > > Gary Menzel
> > > Web Development Manager
> > > IT Operations Brisbane -+- ABN AMRO Morgans Limited
> > > Level 29, 123 Eagle Street BRISBANE QLD 4000
> > > PH: 07 333 44 828  FX:  07 3834 0828
> > >=3D20
> > >=3D20
> > >=3D20
> > >=3D20
> > > If this communication is not intended for you and you are not an =3D
> > authorised =3D3D
> > > recipient of this email you are prohibited by law from dealing with =
> or =3D
> > relyi=3D3D
> > > ng on the email or any file attachments. This prohibition includes =
> =3D
> > reading, =3D3D
> > > printing, copying, re-transmitting, disseminating, storing or in any =
> =3D
> > other w=3D3D
> > > ay dealing or acting in reliance on the information.  If you have =
> =3D
> > received t=3D3D
> > > his email in error, we request you contact ABN AMRO Morgans Limited =
> =3D
> > immediat=3D3D
> > > ely by returning the email to [EMAIL PROTECTED] and destroy =
> =3D
> > the ori=3D3D
> > > ginal. We will refund any reasonable costs associated with notifying =
> =3D
> > ABN AMR=3D3D
> > > O Morgans. This email is confidential and may contain privileged =3D
> > client info=3D3D
> > > rmation. ABN AMRO Morgans has taken reasonable steps to ensure the =
> =3D
> > accuracy =3D3D
> > > and integrity of all its communications, including electronic =3D
> > communications=3D3D
> > > , but accepts no liability for materials transmitted. Materials may =
> =3D
> > also be =3D3D
> > > transmitted without the knowledge of ABN AMRO Morgans.  ABN AMRO =3D
> > Morgans Lim=3D3D
> > > ited its directors and employees do not accept liability for the =3D
> > results of =3D3D
> > > any actions taken or not on the basis of the information in this =3D
> > report. ABN=3D3D
> > >  AMRO Morgans Limited and its associates hold or may hold securities =
> =3D
> > in the =3D3D
> > > companies/trusts mentioned herein.  Any recommendation is made on =
> the =3D
> > basis =3D3D
> > > of our research of the investment and may not suit the specific =3D
> > requirements=3D3D
> > >  of clients.  Assessments of suitability to an individual=3D3D3Fs =
> =3D
> > portfolio can =3D3D
> > > only be made after an examination of the particular client=3D3D3Fs =
> =3D
> > investments, =3D3D
> > > financial circumstances and requirements.
> >=20
> > ---
> > You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> > To unsubscribe send a blank email to =3D
> > [EMAIL PROTECTED]
> >=20
> > MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
> > http://www.mxdu.com/ + 24-25 February, 2004
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to =
> [EMAIL PROTECTED]
> 
> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
> http://www.mxdu.com/ + 24-25 February, 2004

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to