orsino Posted February 8, 2020 Posted February 8, 2020 hey i have this line in my daily cron $db->query("UPDATE `users` SET `steps`=`steps`= 100 WHERE `steps` < 100"); so steps in users schould get 100 each day but the line doesnt work did i overlook something ? or is it sql related ? sql is steps int11 unsigned Quote
Mark Topper Posted February 8, 2020 Posted February 8, 2020 Depending on what you are trying, this first query will set the step to be 100: UPDATE `users` SET `steps` = 100 WHERE `steps` < 100 The next one will add 100 to the step: UPDATE `users` SET `steps` = `steps` + 100 WHERE `steps` < 100 Quote
ags_cs4 Posted February 8, 2020 Posted February 8, 2020 `steps`=`steps`= the error is here just use one `steps`= Quote
Curt Posted February 8, 2020 Posted February 8, 2020 $db->query("UPDATE `users` SET `steps`= 100 WHERE `steps` < 100"); Quote
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.