简体   繁体   中英

Php update specific user specific points

I'm trying to do is update specific data in a user database. in my case is the maxcliks row. I need it to be updated when the application amount received is greater than the saved value. He is updating but only when maxcliks is higher than the maxcliks of the best player, thus is not updating when my maxcliks is higher that my maxcliks saved in database. I need something like this: UPDATE users SET maxcliks='$maxcliks' WHERE login='$login' IF maxcliks<'$maxcliks'

Which DB are you use?

MySQL 5.5.35 does not support your query.

Maybe next query will be helpful:

UPDATE users SET maxcliks='$maxcliks' WHERE login = '$login' AND maxcliks < '$maxcliks'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM