Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
May 11, 2005, 6:16 am
rate this thread
Re: MySql question - can I add 90 minutes to an INT field
This ought to do it:
update tablename set fieldname = fieldname + 5400
If you've named your field "date" you'll need to enclose the fieldname
with backticks as date is a reserved word in MySQL ie
update tablename set `date` = `date` + 5400
Actually I could be wrong about having to have backticks. I know there's
an exception for at least one reserved word (which is probably "date")
which works without the backticks because it was so commonly used as a
fieldname and they didn't want to break compatibility, or something
along those lines.
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com