Topic: Problemo!!

I'm trying to change my permissions to a certain forum ie. (guests can't read)

I get this error:

An error was encountered
Error: Unable to insert group forum permissions.

This is my code:

                        // Run an UPDATE and see if it affected a row, if not, INSERT
                        $db->query('UPDATE '.$db->prefix.'forum_perms SET read_forum='.$read_forum_new.', post_replies='.$post_replies_new.', post_topics='.$post_topics_new.' WHERE group_id='.$cur_group['g_id'].' AND forum_id='.$forum_id) or error('Unable to insert group forum permissions', __FILE__, __LINE__, $db->error());
                        if (!$db->affected_rows())
                            $db->query('INSERT INTO '.$db->prefix.'forum_perms (group_id, forum_id, read_forum, post_replies, post_topics) VALUES('.$cur_group['g_id'].', '.$forum_id.', '.$read_forum_new.', '.$post_replies_new.', '.$post_topics_new.')') or error('Unable to insert group forum permissions', __FILE__, __LINE__, $db->error());

Whats wrong? I just installed sub-forum mod so maybe I did something wrong with that?? =/

I'm at a loss.... but this is the file i think where the problem is? (admin_forum.php)

Re: Problemo!!

Enable debug mode, paste the full error

3 (edited by GeoffG 2007-03-09 20:10)

Re: Problemo!!

File: admin_forums.php
Line: 203

PunBB reported: Unable to insert group forum permissions

Database reported: 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 'AND forum_id=36' at line 1 (Errno: 1064)

>_> not sure what to do.

Re: Problemo!!

Sounds like a variable isn't being set properly although it should be: restore a clean copy of admin_forums.php and try installing the mod again

5 (edited by GeoffG 2007-03-10 08:06)

Re: Problemo!!

Smartys wrote:

Sounds like a variable isn't being set properly although it should be: restore a clean copy of admin_forums.php and try installing the mod again

Alright i'll do that, and thanks again.