Tainted Kitten Posted March 8, 2009 Share Posted March 8, 2009 So I was wondering the best way to do this. Basically I have a subscribed field which has a date in it. I want to write a query which pretty much goes. Only if subscribed is equal to today's date or a date in the future, then add three to creation field (numeric field) otherwise don't do anything. Thanks for any advice Quote Link to comment https://forums.phpfreaks.com/topic/148516-solved-new-to-mysql-wanting-to-write-a-query/ Share on other sites More sharing options...
Mchl Posted March 8, 2009 Share Posted March 8, 2009 UPDATE table SET creation = creation + 3 WHERE subscribed >= CURDATE() Quote Link to comment https://forums.phpfreaks.com/topic/148516-solved-new-to-mysql-wanting-to-write-a-query/#findComment-779886 Share on other sites More sharing options...
Tainted Kitten Posted March 8, 2009 Author Share Posted March 8, 2009 Thanks for that Much appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/148516-solved-new-to-mysql-wanting-to-write-a-query/#findComment-779888 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.