So I have a blog and some of my entries are set to "members", but I want to set them to "everyone". I originally thought it was only a few entries and so I thought to change them manually using PhpMyAdmin, but quickly realized I had more than I thought.

When using PhpMyAdmin I noticed when making the change manually (point and click) this was the command it was using (see below). I'd like to repeat this but for ALL entries.

Is there a wild card I can use for the entry_id value?

UPDATE `database_name`.`blog_entry` 
SET `allow_view_entry` = 'everyone' 
WHERE `blog_entry`.`entry_id` = 4624;

closed as off-topic by Paul White, Michael Green, Colin 't Hart, Philᵀᴹ, dezso Mar 3 '15 at 12:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Paul White, Michael Green, Colin 't Hart, Philᵀᴹ, dezso
If this question can be reworded to fit the rules in the help center, please edit the question.

  • If you want to update all rows, just remove the where clause. – Colin 't Hart Mar 3 '15 at 10:31

Well, if you want to update ALL entries, why don't you just get rid of the condition, and execute:

UPDATE blog_entry SET allow_view_entry = 'everyone'

Otherwise, you can use a wildcard indeed, and build your statement like this:

UPDATE blog_entry SET allow_view_entry = 'everyone'
WHERE entry_id LIKE '%245%'

using the common wildcards that go with the LIKE operator.

Not the answer you're looking for? Browse other questions tagged or ask your own question.