Help - Search - Members - Calendar
Full Version: SQL errors
Dumpshock Forums > Discussion > Dumpshock News, Bug Reports, Feature Requests, & Discussion
Penta
Aiee....

One recieves an SQL error when one tries to find out who the moderators are. The error is as follows (copy&paste):

mySQL query error: 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_members m, ibf_categories c
LEFT JOIN ibf_moderators mod ON((m.id=mod.member_id or (mod.is_group=1 and mod.group_id=m.mgroup)))
LEFT JOIN ibf_forums f ON(f.id=mod.forum_id)
WHERE c.id=f.category AND c.state != 0

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 ON((m.id=mod.member_id or (mod.is_group=1 and mod.group_id=m.mgroup)))
' at line 4
mySQL error code:
Date: Tuesday 12th of April 2005 12:44:08 AM

Next, one observes this when trying to report a post:

mySQL query error: SELECT m.name, m.email, mod.member_id FROM ibf_moderators mod, ibf_members m WHERE mod.forum_id='7' and mod.member_id=m.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, ibf_members m WHERE mod.forum_id='7' and mod.member_id=m.id' at line 1
mySQL error code:
Date: Tuesday 12th of April 2005 12:48:19 AM
Neuron Basher
Thanks for the report, this should be solved now. MySQL made "mod" a reserved word in 4.1, so the database didn't like the queries that used mod as the table alias for ibf_moderators. I modified the queries to use a different alias and it seems to be fine now.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Dumpshock Forums © 2001-2012