Posted on: 10/27/04 07:58pm
By: computerade
Is there anyway to select a number of stories at once and give them all the same permissions. I made everything only for members, and now i want to give it anonymous access and that would take hours to manually set all the permissions for each story. Anyone know how i could do it faster ? Maybe in SQL ?
Thanks.
Changing Multiple Story Permissions
Posted on: 10/27/04 10:00pm
By: hidden
i dont know if there is a feature like that in geeklog. but if you have access to you database you can do that with just a single query. i have done that once.
uo can do something like this
UPDATE gl_stories set perm_anon=2
change gl_stories to the actual stories table name in your geeklog database.
Changing Multiple Story Permissions
Posted on: 10/27/04 10:58pm
By: computerade
can you give me a little bit more detail, im really bad at working with SQL. Im using phpmyadmin for an SQL administration program.
Changing Multiple Story Permissions
Posted on: 10/27/04 11:15pm
By: hidden
in your phpmyadmin point to your geeklog database click on query window. execute the query below.
UPDATE gl_stories set perm_anon=2
change gl_stories to the actual stories table name in your geeklog database.
this will give anonymous user read access to all of you stories.
Changing Multiple Story Permissions
Posted on: 10/28/04 12:24am
By: computerade
i already tried that it doesn't seem to do anything, at most it just lists all the stories, and then someitmes it just says:
" You have to choose at least one Column to display "
There are all kinds of boxes in the query option that i don't know about.
My table is gl_stories.
Changing Multiple Story Permissions
Posted on: 10/28/04 02:05am
By: hidden
[QUOTE BY= computerade] i already tried that it doesn't seem to do anything, at most it just lists all the stories, and then someitmes it just says:
" You have to choose at least one Column to display "
There are all kinds of boxes in the query option that i don't know about.
My table is gl_stories.[/QUOTE]
you mean this code?
UPDATE gl_stories set perm_anon=2
try doing it again, this time use this query
UPDATE gl_stories set perm_anon=2 where perm_anon<>2
Changing Multiple Story Permissions
Posted on: 10/28/04 10:20am
By: computerade
Changing Multiple Story Permissions
Posted on: 10/28/04 08:02pm
By: hidden
did you click on submit query? the one on the lower right? that query should do what you wanted to happen.
Changing Multiple Story Permissions
Posted on: 10/28/04 08:05pm
By: computerade
yes i did, nothing happens except that error message in red comes up.
Changing Multiple Story Permissions
Posted on: 10/28/04 09:52pm
By: Anonymous (mach)
maybe throw a semicolon at the end of the command. shouldn't matter with phpmyadmin, but whoknows
Changing Multiple Story Permissions
Posted on: 10/29/04 12:24am
By: computerade
Error
SQL-query:
SELECT *
FROM `gl_stories`
WHERE 1
UPDATE gl_stories SET perm_anon =2 WHERE perm_anon <>2 LIMIT 0 ,
30
MySQL said:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE gl_stories set perm_anon=2 where perm_anon<>2 LIMIT 0, 3
That is all i get, it has gone through properly and it says it affects like 300 rows but then nothing is even changed, the permissions are still not anonymous for all the stories.
Changing Multiple Story Permissions
Posted on: 10/29/04 01:43am
By: hidden
thats not the query i was telling you! try to compare the one you executed and the one im telling you.
on the screen shot you've posted here. just below the phpMyAdmin logo in the upper left. that icon third from left(the one that was labeled SQL), click that, paste the query i'm telling you and click on go button.
Changing Multiple Story Permissions
Posted on: 10/29/04 01:55am
By: computerade
Affected rows: 0 (Query took 0.0329 sec)
SQL-query:
UPDATE gl_stories SET perm_anon =2 WHERE perm_anon <>2