vbnullchar Posted March 20, 2007 Share Posted March 20, 2007 i wanted to update all my tables field value to "0", but the problem is i got 20 fields the usual way "update table1 set field1=0,field2=0,field3=0....field20=0 where id='my_id'"; is there a way to update all fields without specifying the fields to update? Link to comment https://forums.phpfreaks.com/topic/43431-update-query-problem/ Share on other sites More sharing options...
btherl Posted March 20, 2007 Share Posted March 20, 2007 No there's not.. you might want to redesign your database if this is a recurring problem. Otherwise, just write a function to set all the fields to 0 and you're finished. It only has to be written once. Link to comment https://forums.phpfreaks.com/topic/43431-update-query-problem/#findComment-210914 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.