You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '( tn.tid SEPARATOR ',' ) AS tids FROM l query: SELECT li.nid, GROUP_CONCAT( tn.tid SEPARATOR ',' ) AS tids FROM leech_news_item li LEFT JOIN term_node tn ON tn.nid = li.nid WHERE li.fid = 0 GROUP BY nid in /home/www/doc/11111/mysite.com/www/includes/database.mysql.inc on line 121.

Sometimes when I add a new feed I get this. What could it be? (Drupal 4.7.5, fresh install)

Comments

aron novak’s picture

Assigned: Unassigned » aron novak
Status: Active » Postponed (maintainer needs more info)

Which version of MySQL do you use?
Can you send a mysql.log slice when it happens?

Thanks,
Aron

funana’s picture

Hi Aron,

I use MySQL - 4.0.24-max. I will watch out for the error and send you the mysql log then.

alex_b’s picture

What's looking wrong is that li.fid is 0 and that the GROUP BY clause says "nid" and not "li.nid" - which semantically doesn't make a difference, but it surprises me that MySQL doesn't complain.

funana’s picture

Is there a solution?

alex_b’s picture

funana,

Unfortunately not.

I don't have a MySQL 4.0 installation here at hand. The posted query works fine w/ 4.1. It would be great if you could play around w/ this query and come up with a solution. GROUP_CONCAT/SEPARATOR should be available in 4.0, probably it's a minor syntax issue.

If not, you could alternatively pull all feed item nodes and their term ids without grouping them, but ordering them by node id. You cold then group the tid by nid in PHP. I am afraid this could be slower than the current solution, though.

Alex