Thanks for your response,

I'm using ColdFusion along side of MySQL to server dynamic content to some websites.

When I run the page that this code is in, I get an SQL syntax error:
Syntax error or access violation: You have an error in your SQL syntax near '(theDate) = '31' and month(theDate) = '9' and year(theDate) = '2003''


The right values are displayed from ColdFusion server, but I keep getting the syntax error.

Yves

At 10:35 2004-01-21, you wrote:
function can b used, but value parameter seems syntactically wrong, check
that.

'#session.month#' to '$month'

which is the language,u r using anyway?


----- Original Message ----- From: "Yves Arsenault" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 21, 2004 6:37 PM Subject: Function in Where clause


> Hello, > > I have a client using a already made calendar component on my server... > > The problem seems to be the SQL code. > > This code works (i believe) with an MS Access or MS SQL server DB... > MySQL version is 3.23.58 > > The code is: > > 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? > > Is there a better way to achieve this? > > Thanks, > > Yves > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] >


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



Reply via email to