MySQL Forums
Forum List  »  Newbie

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
February 21, 2006 09:05PM
February 21, 2006 09:09PM


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.