MyBB Community Forums

Full Version: SQL error banlist
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Im having a error with a plugin that show bans

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1064 - 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 '-20, 20' at line 1
Query:
SELECT * FROM xxprefix_banned ORDER BY dateline DESC LIMIT -20, 20

ive tried
SELECT * FROM xx_banned ORDER BY dateline DESC LIMIT 20
SELECT * FROM xx_banned ORDER BY dateline DESC LIMIT 0
The offset parameter of LIMIT can't be negative. https://stackoverflow.com/questions/4367...t-in-mysql
i have also tried 20
and
SELECT * FROM mybb_banned ORDER BY dateline DESC LIMIT 20, 20
So did you try doing what the stackoverflow thread I linked said to do?
Is it about query this? (SELECT * FROM highscores
WHERE score <= ( SELECT score FROM highscores WHERE userID = someID )
ORDER BY score, updated ASC
LIMIT 9)
UNION
(SELECT * FROM highscores
WHERE score = ( SELECT score FROM highscores WHERE userID = someID ))
UNION
(SELECT * FROM highscores
WHERE score >= ( SELECT score FROM highscores WHERE userID = someID )
ORDER BY score, updated ASC
LIMIT 9)

if yea it didnt work
its with {$bans} and from mysql it seems a missing parameters

on browse

SELECT *
FROM mybb_banned
LIMIT 0 , 30