I have query like:
UPDATE orders SET order_state = $state_id, order_confirmed = now() WHERE order_id = $id LIMIT 1
I’m just wondering if there was a function in php or sql that returned the updated timestamp kind of like insert id.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To avoid second query, use php’s
DateTime Objectand format it, instead of Mysql’sNOW()