Skip to content

Instantly share code, notes, and snippets.

@MissAllSunday
Created October 7, 2013 18:08
Show Gist options
  • Save MissAllSunday/6872383 to your computer and use it in GitHub Desktop.
Save MissAllSunday/6872383 to your computer and use it in GitHub Desktop.
Database 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 'WHERE b.id_board IN (2)
AND bp.id_group IN (2, 4, 3)
AND bp.permission ' at line 6
SELECT MIN(bp.add_deny) AS add_deny
FROM smf_boards AS b
INNER JOIN smf_board_permissions AS bp ON (bp.id_profile = b.id_profile)
LEFT JOIN smf_moderators AS mods ON (mods.id_board = b.id_board AND mods.id_member = 2)
LEFT JOIN smf_moderator_groups AS modgs ON (modgs.id_board = b.id_board AND b.id_group IN (2, 4)
WHERE b.id_board IN (2)
AND bp.id_group IN (2, 4, 3)
AND bp.permission = 'remove_any'
AND (mods.id_member IS NOT NULL OR modgs.id_group IS NOT NULL OR bp.id_group != 3)
GROUP BY b.id_board
ORDER BY null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment