[email protected] Posted July 21, 2008 Share Posted July 21, 2008 I am trying to have this query work: UPDATE actions, users SET actions.days = actions.days - TIMESTAMPDIFF(DAY, '2008-07-21 13:26:56', NOW()) WHERE TIMESTAMPDIFF(DAY, '2008-07-21 13:26:56', NOW()) >= 1 AND ((actions.fromid = '1269323825' OR actions.toid = '1269323825') AND users.user = '1269323825' AND actions.days >0 AND actions.days < 90 AND actions.type='P') And when i try that, i get: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(DAY, '2008-07-21 13:26:56', NOW()) WHERE TIMESTAMPDIFF(DAY, '2008-07-21 13:26:5' at line 1 But i don't see a place when its wrong. Can anyone help please? Quote Link to comment https://forums.phpfreaks.com/topic/115903-query-errors/ Share on other sites More sharing options...
[email protected] Posted July 22, 2008 Author Share Posted July 22, 2008 Please? i can't figure this out!? Quote Link to comment https://forums.phpfreaks.com/topic/115903-query-errors/#findComment-596997 Share on other sites More sharing options...
jonsjava Posted July 22, 2008 Share Posted July 22, 2008 wrong board. might want to post your question here Quote Link to comment https://forums.phpfreaks.com/topic/115903-query-errors/#findComment-596998 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.