api.php?query=random&type=x produces bad SQL

Issue #81 resolved
Lucas Werkmeister created an issue

https://mix-n-match.toolforge.org/api.php?query=random&type=x

string(40) " AND `type`='x' ORDER BY random LIMIT 10"
string(402) "#0 /data/project/mix-n-match/classes/MixNMatch.php(67): ToolforgeCommon->getSQL(Object(mysqli), ' AND `type`='x'...', 0)
#1 /data/project/mix-n-match/classes/API.php(991): MixNMatch\MixNMatch->getSQL(' AND `type`='x'...')
#2 /data/project/mix-n-match/classes/API.php(126): MixNMatch\API->query_random(Array)
#3 /data/project/mix-n-match/public_html/api.php(18): MixNMatch\API->query('random')
#4 {main}"
{"status":"ToolforgeCommon::getSQL: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND `type`='x' ORDER BY random LIMIT 10' at line 1\/1064 :\n AND `type`='x' ORDER BY random LIMIT 10"}

Comments (2)

  1. Log in to comment