madspof Posted January 13, 2008 Share Posted January 13, 2008 Hi everyone, i am currently trying to find a way to enter a 0 into a field for not just one row but all the rows in a table is there a way of doing this ? Link to comment https://forums.phpfreaks.com/topic/85759-is-there-a-query-that-can-insert-the-same-number-all-the-way-down-a-field/ Share on other sites More sharing options...
Zane Posted January 13, 2008 Share Posted January 13, 2008 UPDATE tableName SET colname = 'zero'; Link to comment https://forums.phpfreaks.com/topic/85759-is-there-a-query-that-can-insert-the-same-number-all-the-way-down-a-field/#findComment-437702 Share on other sites More sharing options...
revraz Posted January 13, 2008 Share Posted January 13, 2008 Also, if its empty now and you set the default to 0, then it would populate it as well. Link to comment https://forums.phpfreaks.com/topic/85759-is-there-a-query-that-can-insert-the-same-number-all-the-way-down-a-field/#findComment-437711 Share on other sites More sharing options...
madspof Posted January 13, 2008 Author Share Posted January 13, 2008 is it possible to do somethnig like this UPDATE tableName SET colname = 'zero' WHERE userid = '$id' Link to comment https://forums.phpfreaks.com/topic/85759-is-there-a-query-that-can-insert-the-same-number-all-the-way-down-a-field/#findComment-438117 Share on other sites More sharing options...
revraz Posted January 13, 2008 Share Posted January 13, 2008 Try it Link to comment https://forums.phpfreaks.com/topic/85759-is-there-a-query-that-can-insert-the-same-number-all-the-way-down-a-field/#findComment-438150 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.