plznty Posted November 25, 2009 Share Posted November 25, 2009 How would I go about updating entire columns, for example. SQL TABLE ID - USERNAME - POINTS 1 - JAMES - 20 2 - JOHN - 40 How would i go about making a script on php to update everything in the points column, say for example if i wanted to (points + 4) or (points*5) etc. I know about how to make a connection, i just dont know how to target every result. Link to comment https://forums.phpfreaks.com/topic/182893-php-updating-mysql-columns/ Share on other sites More sharing options...
cags Posted November 25, 2009 Share Posted November 25, 2009 UPDATE table SET points=points+4 By omitting a WHERE clause all rows will be updated. Link to comment https://forums.phpfreaks.com/topic/182893-php-updating-mysql-columns/#findComment-965337 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.