Page 1 of 1

freetag - another sql error

Posted: Mon Feb 02, 2009 5:22 am
by rupa
This one is just an error, not a security thing. The following SQL is generated:

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
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.

Re: freetag - another sql error

Posted: Mon Feb 02, 2009 10:29 am
by garvinhicking
Hi!

Thanks a lot, I hopefully also fixed this in version 3.03 of the plugin :)

Regards,
Garvin