Onloac Posted November 30, 2010 Share Posted November 30, 2010 quick question... I have a column in my table called views. I want to reset the column to 0 for each row in the table. What's the easiest way to do this? Link to comment https://forums.phpfreaks.com/topic/220233-quick-database-question/ Share on other sites More sharing options...
litebearer Posted November 30, 2010 Share Posted November 30, 2010 if you are resetting that field in ALL the rows, a simple "UPDATE tablename set field_name = 0" should do the trick. When you DON'T use a condition (ie WHERE somefield = some_value) all records are updated Link to comment https://forums.phpfreaks.com/topic/220233-quick-database-question/#findComment-1141343 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.