Thanks to all those who answered....

Even after changing the the day() to dayofmonth(), the queries would still
not pull out the request information...

After a little reflection, I noticed that something had changed.... this DB
was originally an Access DB, and it was converted to MySQL, in the
conversion, the format of that field wasn't quite as before.

After I noticed that, a couple of changes, no prob.

Thanks again,

Yves

At 10:52 2004-01-21, you wrote:
Yves Arsenault wrote:
SELECT *
FROM events
WHERE day(theDate) = '#dayVal#' and month(theDate) = '#session.month#' and year(theDate) = '#session.year#'
Can the day() function be used in this way in the WHERE statement?

Yes, but only from version 4.1.1
Use DayOfMonth() or preferably Extract() (which is the method from the SQL standard) per the manual.



Is there a better way to achieve this?

Loose the single quotes and start using cfqueryparam.


Jochem

--
I don't get it
immigrants don't work
and steal our jobs
    - Loesje


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to