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 ? Quote 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'; Quote 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. Quote 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' Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.