longtone Posted May 5, 2008 Share Posted May 5, 2008 Is there a way to add a variable to an entry in one operation? ie: there is an entry in column 'points' with value = 11 there is a variable $morepoints = 6 I want to update the entry to 17, but without having to SELECT it, perform the sum and then UPDATE Link to comment https://forums.phpfreaks.com/topic/104137-solved-adding-to-an-entry-in-one-operation/ Share on other sites More sharing options...
trq Posted May 5, 2008 Share Posted May 5, 2008 UPDATE tbl SET points=points+6 WHERE id = 1; Link to comment https://forums.phpfreaks.com/topic/104137-solved-adding-to-an-entry-in-one-operation/#findComment-533193 Share on other sites More sharing options...
longtone Posted May 5, 2008 Author Share Posted May 5, 2008 So simple Thanks Link to comment https://forums.phpfreaks.com/topic/104137-solved-adding-to-an-entry-in-one-operation/#findComment-533281 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.