[EMAIL PROTECTED] wrote:

Try this:

<!--- do insert now --->
<CFQUERY NAME="qnews" DATASOURCE="#dsn#" USERNAME="#un#" PASSWORD="#pw#">
      INSERT INTO guide (title, content, update)
               VALUES ('#title#', '#content#', '#DateFormat(Now(),
""YYYY-MM-DD"")#')
</CFQUERY>

I may have the double quotes wrong, but that should work. MySQL receives
the date/time from Now() as an ODBC date/time string (the ones that go
{blah blah}). MySQL doesn't accept those at present, so you have to
manually format (I could be wrong, if so, someone tell me 'cos it'll
make my life easier!).

By the way, if your 'update' field is simply the time when the field is
last update (which it appears to be) and you'll never want to insert
something different, MySQL has a custom datetime type that is updated
whenever you perform an UPDATE or INSERT. Copied from the MySQL manual
is this:
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to