简体   繁体   English

PHP更新特定用户特定点

[英]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. 在我的情况下是maxcliks行。 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. 他正在更新,但是仅当maxcliks高于最佳玩家的maxcliks时才更新,因此,当我的maxcliks高于数据库中保存的maxcliks时,他就不会更新。 I need something like this: UPDATE users SET maxcliks='$maxcliks' WHERE login='$login' IF maxcliks<'$maxcliks' 我需要这样的东西: 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. MySQL 5.5.35不支持您的查询。

Maybe next query will be helpful: 也许下一个查询会有所帮助:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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