IPB Problem


#1

Hello,

I am running IPB 1.3.1 and when I click on “The moderating team” (near the bottom) I get a page stating that there is an error:


mySQL query error: SELECT m2.id, m2.name, m2.email, m2.hide_email, m2.location, m2.aim_name, m2.icq_number,
f.id as forum_id, f.read_perms, f.name as forum_name, c.state
FROM ibf_moderators mod
LEFT JOIN ibf_forums f ON(f.id=mod.forum_id)
LEFT JOIN ibf_categories c ON(c.id=f.category AND c.state != 0)
LEFT JOIN ibf_members m2 ON (mod.member_id=m2.id)

mySQL error: 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 ‘mod
LEFT JOIN ibf_forums f ON(f.id=mod.forum_id)
’ at line 3
mySQL error code:
Date: Wednesday 01st of June 2005 07:23:47 PM


I am thinking that when Dreamhost upgraded to a newer version of PHP it somehow broke something in IPB becuase everything was working fine and dandy before! I tried to find a solution to this problem on google but with no luck, perhaps somebody on theses forums can help me?

Thanks!

Orange Pop Design


#2

Well, this thread may be of some assistance. I can report that version 2.0.4 does not have this problem. That I know of. gulps and crosses fingers


#3

This will fix your problem;

in /sources/misc/stats.php find:

//--------------------------------------------
// Do we have any moderators? NORMAL MODS 1st
//--------------------------------------------

$DB->query(“SELECT m2.id, m2.name, m2.email, m2.hide_email, m2.location, m2.aim_name, m2.icq_number,
f.id as forum_id, f.read_perms, f.name as forum_name, c.state
FROM ibf_moderators mod
LEFT JOIN ibf_forums f ON(f.id=mod.forum_id)
LEFT JOIN ibf_categories c ON(c.id=f.category AND c.state != 0)
LEFT JOIN ibf_members m2 ON (mod.member_id=m2.id)
”);

Replace with:

//--------------------------------------------
// Do we have any moderators? NORMAL MODS 1st
//--------------------------------------------

$DB->query(“SELECT m2.id, m2.name, m2.email, m2.hide_email, m2.location, m2.aim_name, m2.icq_number,
f.id as forum_id, f.read_perms, f.name as forum_name, c.state
FROM ibf_moderators mod
LEFT JOIN ibf_forums f ON(f.id=mod.forum_id)
LEFT JOIN ibf_categories c ON(c.id=f.category AND c.state != 0)
LEFT JOIN ibf_members m2 ON (mod.member_id=m2.id)
”);

Find:

//--------------------------------------------
// Do we have any moderators? GROUP MODS 1st
//--------------------------------------------

$DB->query(“SELECT m.id, m.name, m.email, m.hide_email, m.location, m.aim_name, m.icq_number,
f.id as forum_id, f.read_perms, f.name as forum_name, c.state
FROM ibf_moderators mod
LEFT JOIN ibf_forums f ON(f.id=mod.forum_id)
LEFT JOIN ibf_categories c ON(c.id=f.category AND c.state != 0)
LEFT JOIN ibf_members m ON ((mod.is_group=1 and mod.group_id=m.mgroup))
”);

Replace with:

//--------------------------------------------
// Do we have any moderators? GROUP MODS 1st
//--------------------------------------------

$DB->query(“SELECT m.id, m.name, m.email, m.hide_email, m.location, m.aim_name, m.icq_number,
f.id as forum_id, f.read_perms, f.name as forum_name, c.state
FROM ibf_moderators mod
LEFT JOIN ibf_forums f ON(f.id=mod.forum_id)
LEFT JOIN ibf_categories c ON(c.id=f.category AND c.state != 0)
LEFT JOIN ibf_members m ON ((mod.is_group=1 and mod.group_id=m.mgroup))
”);

Basically, just put grave around the word mod, so it looks like mod, let me know if it fix the problem.


#4

Excellent, it worked! Thank you very much for taking the time to help me with my problem!

Orange Pop Design