Details
Description
I was testing 1.7 agaisnt different DBs when I've found this query:
SELECT DISTINCT(p.id), p.*, d.forum, u.firstname, u.lastname, u.email, u.picture
FROM m_forum_posts p, m_forum_discussions d, m_user u
WHERE ... ... ...
ORDER BY p.modified DESC
The list of fields in the SELECT clause seems to be really crazy, with one DISTINCT being applied to only one field (p.id) and, then, again, all the fields of p (p.*).
I'm pretty sure that such syntax isn't correct at all. I only have tested it against Oracle and ir crash! My suggestion, if there isn't any good reason for the current syntax is to simply change it to:
SELECT p.*, d.forum, u.firstname, u.lastname, u.email, u.picture
FROM m_forum_posts p, m_forum_discussions d, m_user u
WHERE ... ... ...
ORDER BY p.modified DESC
Not need to specify the DISTINCT at all, because ADOdb will guarantee unique values for the 1st field on each query.