wwfc_barmy_army Posted June 14, 2007 Share Posted June 14, 2007 Hello. I'm a noob when it comes to MySQL. But i'm in phpMyAdmin and i've got a field in a table (news_limit) and i want to change the value in that to 2 for all of them, but theres 50 of them. What command would i use? I think i have to use the amend command. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/55585-solved-how-can-i/ Share on other sites More sharing options...
obsidian Posted June 14, 2007 Share Posted June 14, 2007 Open up your SQL window and just do something like this: UPDATE news_limit SET colname = 2; When you do an update with no WHERE clause, it will update every record. Quote Link to comment https://forums.phpfreaks.com/topic/55585-solved-how-can-i/#findComment-274628 Share on other sites More sharing options...
wwfc_barmy_army Posted June 14, 2007 Author Share Posted June 14, 2007 i need to add something else to that, it's in the newsfeeds table. And the MySQL command it trying to find it in the database and not the table newsfeeds. So it goes databasename -> newsfeeds -> news_limit (column) Thanks for any help Quote Link to comment https://forums.phpfreaks.com/topic/55585-solved-how-can-i/#findComment-274635 Share on other sites More sharing options...
Wildbug Posted June 14, 2007 Share Posted June 14, 2007 USE databasename; UPDATE newsfeeds SET news_limit=2; Quote Link to comment https://forums.phpfreaks.com/topic/55585-solved-how-can-i/#findComment-274653 Share on other sites More sharing options...
wwfc_barmy_army Posted June 14, 2007 Author Share Posted June 14, 2007 Thanks Guys Quote Link to comment https://forums.phpfreaks.com/topic/55585-solved-how-can-i/#findComment-274656 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.