this query failed in PostgreSQL because it lacks a GROUP BY clause which is required when using a ORDER BY:
SELECT COUNT(*) FROM node_comments nc INNER JOIN node n ON n.nid = nc.cid WHERE nc.thread <= '' AND n.status <> 0 AND n.nid != 122 AND nc.nid = 121 ORDER BY nc.thread ASC;
However, where counting here, not trying to retrive particular columns, so why are we even bothering with ordering the returned dataset. It merely slows the query.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | nodecomment_592564.patch | 848 bytes | crea |
Comments
Comment #1
crea commentedYep, the query doesn't make sense.
Comment #2
crea commentedPlease try this patch.
Comment #3
crea commented