whelpton Posted July 23, 2008 Share Posted July 23, 2008 I am currently using a mysql database to store my user data. I am trying to create a referal script that when a user refers a friend it increases his webspace ammount, I am a bit stumped on how to add a certain ammount to a mysql database. For example: $do = mysql_query("UPDATE Users SET kquota =? WHERE id = '$refer' LIMIT 1") or die(mysql_error()); I need the KQuota to increase by 50, I am a little confued on how to do this, I know how to change the ammount, but not add to it. Thanks for your time =) Link to comment https://forums.phpfreaks.com/topic/116293-solved-mysql-databases/ Share on other sites More sharing options...
revraz Posted July 23, 2008 Share Posted July 23, 2008 kquota = kquota + 50 Assuming its set as INT? Link to comment https://forums.phpfreaks.com/topic/116293-solved-mysql-databases/#findComment-597987 Share on other sites More sharing options...
whelpton Posted July 23, 2008 Author Share Posted July 23, 2008 Yeah it is, thanks alot Link to comment https://forums.phpfreaks.com/topic/116293-solved-mysql-databases/#findComment-597988 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.