MySQL Forums
Forum List  »  MySQL Query Browser

Editing fields using functions
Posted by: Brian Judy
Date: September 02, 2005 10:29PM

My problem is that I'm trying to update a DATETIME column by using the NOW() function in the result area. However, if I just type NOW() into the field, it doesn't work. I checked the query it's submitting to the database and it's adding quotes around it like so:

UPDATE myTable SET date = 'NOW()' WHERE ...
instead of
UPDATE myTable SET date = NOW() WHERE ...
as it should be

I guess this is understandable since typing in a actual date would need the quotes, but is there any way to get around this? Other than typing the query I want into the query window, of course. It's kind of a hassle doing it that way.

I looked throught the help and all around the internet but couldn't find any answers. I'd appreciate any input.

Options: ReplyQuote


Subject
Written By
Posted
Editing fields using functions
September 02, 2005 10:29PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.