Skip navigation links

MySQL Forums :: Newbie :: DATE + CURRENT_TIMESTAMP for expiration


Advanced Search

DATE + CURRENT_TIMESTAMP for expiration
Posted by: xix_held ()
Date: February 21, 2006 09:05PM

ive written an e trader... theres a field for creation date/time, and expiration date/time, the problem is, when posting a message I write an INSERT query,
INSERT INTO tbl(etc,etc,.., CURRENT_TIMESTAMP(), $expire)
I dont know exactly how to write $expire field, user select between 1 day, 1 month, 1 year, and never expires... How can I write it?????????????? plz. help me. Ive tried

For month: PERIOD_ADD(CURRENT_TIMESTAMP(),1) ... but it cuts TIME, leaves only date + month.

For week,year, etc... i dont no, nothind...

Options: ReplyQuote


Subject Written By Posted
DATE + CURRENT_TIMESTAMP for expiration xix_held 02/21/2006 09:05PM
FUULTEXT & InnoDB xix_held 02/21/2006 09:09PM
Re: DATE + CURRENT_TIMESTAMP for expiration Xyem TDS 02/21/2006 10:03PM


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.