Gossamer Forum
Quote Reply
GROUP BY
Im trying to use grouping in the mylinks plugin and either I'm doing it wrong or there is a bug. Basically I kept getting errors so I tried printing $GT::SQL::error and the group clause had no table prefix causing the error. eg....

Failed to execute query: '
SELECT *
FROM lsql_CatLinks, lsql_Links
WHERE lsql_CatLinks.LinkID = lsql_Links.ID AND (lsql_Links.ID == '1'))
GROUP BY CatLinks.CategoryID
' Reason: Unknown table 'CatLinks' in group statement at e:/apache/cgi-bin/admin/Plugins/MyLinks_DB.pm line 67.

...as you can see the GROUP BY clause doesn't have the table prefix lsql_

Looking at it, I assume it is because the select_options method requires you to manually enter the clause rather than it being auto-generated....so how can I make it use the correct prefix?

Last edited by:

Paul: Mar 17, 2002, 5:01 AM
Subject Author Views Date
Thread GROUP BY Paul 3686 Mar 17, 2002, 4:57 AM
Thread Re: [Paul] GROUP BY
Paul 3580 Mar 17, 2002, 5:08 AM
Post Re: [Paul] GROUP BY
pugdog 3553 Mar 17, 2002, 9:20 AM
Thread Re: [Paul] GROUP BY
Alex 3587 Mar 17, 2002, 1:58 PM
Thread Re: [Alex] GROUP BY
Paul 3547 Mar 17, 2002, 2:01 PM
Thread Re: [Paul] GROUP BY
Alex 3562 Mar 17, 2002, 2:08 PM
Post Re: [Alex] GROUP BY
Paul 3520 Mar 17, 2002, 2:11 PM
Post Re: [Alex] GROUP BY
Paul 3534 Mar 18, 2002, 3:31 AM
Post Re: [Alex] GROUP BY
Paul 3526 Mar 19, 2002, 4:31 AM
Thread Re: [Paul] GROUP BY
Alex 3567 Mar 17, 2002, 1:53 PM
Post Re: [Alex] GROUP BY
Paul 3586 Mar 17, 2002, 1:56 PM