Posts Tagged with "forum"

Invision Power Board Code Bug

March 1st, 2007 at 11:37 am by Mark
Tags: , , , , , ,

     Yesterday, I was called to fix this bug, which caused a SQL error when users would go to the Stats / Leaders page:


mySQL query error: SELECT,,, m.hide_email, m.location, m.aim_name, m.icq_number, as forum_id, f.read_perms, as forum_name, c.state
  FROM ibf_members m, ibf_categories c
  LEFT JOIN ibf_moderators mod ON(( or (mod.is_group=1 and mod.group_id=m.mgroup)))
  LEFT JOIN ibf_forums f ON(
  WHERE 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(( or (mod.is_group=1 and mod.group_id=m.mgroup)))’ at line 4

     Not too difficult to spot that first LEFT JOIN is broke … Editing the query in ~/sources/misc/stats.php, line 255, and surrounding `mod` with backticks did the job.

     Although, it’d be nice if customers would keep their software versions up-to-date…