freetag - another sql error
Posted: Mon Feb 02, 2009 5:22 am
This one is just an error, not a security thing. The following SQL is generated:
Th issue is that postgres (at least) won't allow two LIMITs being specified. If I remove one or the other, then the query runs without errors.
Code: Select all
2009-02-01 22:20:18 CST ERROR: syntax error at or near "ORDER" at character 337
2009-02-01 22:20:18 CST STATEMENT: SELECT neg.tag AS tag, count(neg.tag) AS total
FROM serendipity_entrytags AS main
LEFT JOIN serendipity_entrytags AS neg ON main.entryid = neg.entryid
WHERE (main.tag = 'Sukumar das')
AND (neg.tag != 'Sukumar das')
GROUP BY neg.tag LIMIT 45 ORDER BY total DESC LIMIT 6