Perad Posted December 19, 2007 Share Posted December 19, 2007 What I want to do is simply add an amount to the ucp_game_credits column. I do not want to call out what it is first. i.e. ucp_game_credits += $newammount How can I do this in SQL? $sql = "UPDATE ucp_users SET ucp_game_credits='???' WHERE ucp_id='". $_SESSION['uid']."'"; Link to comment https://forums.phpfreaks.com/topic/82330-solved-mysql-add-to-existing-column/ Share on other sites More sharing options...
pocobueno1388 Posted December 19, 2007 Share Posted December 19, 2007 $sql = "UPDATE ucp_users SET ucp_game_credits=ucp_game_credits+$newamount WHERE ucp_id='". $_SESSION['uid']."'"; Link to comment https://forums.phpfreaks.com/topic/82330-solved-mysql-add-to-existing-column/#findComment-418456 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.