Topics

User Functions

Events

There are no upcoming events

What's New

Stories last 2 weeks

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Wednesday, April 23 2014 @ 01:04 PM EDT


 Forum Index > Support > General Geeklog Support New Topic Post Reply
 Needed - Database Level Mass Permissions Change
   
winnerdk
 01/16/13 09:53AM (Read 919 times)  
+++++
Full Member

Status: offline


Registered: 04/24/05
Posts: 336
Here's the situation - I've got more than 19,000 published articles in my database. All of them were set with Read and Edit permissions for the Owner, and Read Only permissions for the Group, Members, and Anonymous.

I now need to allow others to edit those articles, so I want to change the Group permissions from Read Only to Read and Edit.

It there a quick and easy way to change all of these permissions for all 19,000+ articles at the database level?

Thanks.

Don
www.panama-guide.com

 
Profile Email Website
 Quote
mystral-kk
 01/17/13 08:12AM  
++++-
Regular Poster

Status: offline


Registered: 03/19/06
Posts: 95
UPDATE gl_stories SET perm_group = 3

"gl_stories" may be different depending on the database table prefix. Anyway, be sure to make a backup of the database before you execute this SQL.

-- mystral-kk, "Every cloud has a silver lining."
 
Profile Email Website
 Quote
winnerdk
 01/17/13 10:08AM  
+++++
Full Member

Status: offline


Registered: 04/24/05
Posts: 336

Great. But please do me one more favor. Please explain the walk through on where and how I would make this change. In phpMyAdmin?

I went into phpMyAdmin and looked at the database for gl_stories and the default (for years) was set to 2 for perm_group. I recently changed that to 3 in the configuration. So the vast majority of the database entries have a 2, and just the last few have a 3. I want to set them all to 3 in the database.

But I don't see where the "update" command is located. Can you steer me towards it?

Or, should I not be in phpMyAdmin, and should I be doing this with another program?

I'm not a database wizard, and every time I get in there, I feel like I'm playing with fire...

Don

 
Profile Email Website
 Quote
Laugh
 01/17/13 10:41AM  
AAAAA
Admin

Status: offline


Registered: 09/27/05
Posts: 998
Yes phpMyAdmin.

At the top you have tabs for Browse, Structure, SQL, Search, ...

Click on the SQL tab.

You will now see a spot where you can enter the sql query. You can paste it in there and click on Go.

You should get a message back like X number of records updated.

You could also run a query like this first

SELECT * FROM `gl_stories` WHERE perm_group != 3

which will return all records that do no have the perm_group set to 3 yet (so all the rows that will get updated by the update query).

You do have to be carefuly when updating the database this way so make sure you do back up the database before you do.

 
Profile Email Website
 Quote
Content generated in: 0.70 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content