itazev Posted August 22, 2007 Share Posted August 22, 2007 Hey everyone! I'm trying to sum values to existing values on the table. Lets suppose that I have an int field called "items" then I want to sum / add more 3 (+3) to the existing value. Is there a way to do that on the MySQL itself or I have to query and sum in php and then store back the sum results? I appreciate your help! Link to comment https://forums.phpfreaks.com/topic/66267-solved-adding-sum-values-to-existing-records/ Share on other sites More sharing options...
teng84 Posted August 23, 2007 Share Posted August 23, 2007 update table set teng=teng+5 where ..... something like that Link to comment https://forums.phpfreaks.com/topic/66267-solved-adding-sum-values-to-existing-records/#findComment-331632 Share on other sites More sharing options...
itazev Posted August 23, 2007 Author Share Posted August 23, 2007 Wonderful! Thank you so much! Link to comment https://forums.phpfreaks.com/topic/66267-solved-adding-sum-values-to-existing-records/#findComment-331874 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.