When trying to use the new report function, I receive the following error:

user error: You have an error in your SQL syntax near 'on sd.nid = c.nid WHERE sd.nid = 16 GROUP BY sd.sid, sd.name ORDER BY sd.sid,' at line 1 query: SELECT sd.sid as sid, c.cid as cid, sd.name as name, sd.data as data FROM webform_submitted_data sd CROSS JOIN webform_component c on sd.nid = c.nid WHERE sd.nid = 16 GROUP BY sd.sid, sd.name ORDER BY sd.sid, c.cid in /[omitted]/database.mysql.inc on line 125.

I am currently running two surveys using the form and I believe "16" is referring to the second survey.

Comments

ullgren’s picture

Assigned: Unassigned » ullgren

Have you run the upgrade of the database.
admin -> modules -> webform -> Upgrade ...
In the CVS branch the table webform_submitted_data is renamed to correct a spelling error.

MySQL version would also be helpfull to know.

rstoeck’s picture

Yes, I ran the upgrade. MySQL version is 3.23.58 on Fedora core 2. Thanks.

ullgren’s picture

Ok, the UNION statement is only available from MySQL 4.0.0.
http://dev.mysql.com/doc/mysql/en/UNION.html

I'll try to figure out a way to solve this with out a UNION.
<rant>
But you really should upgrade since 4.1 has many other nice features such as internal support for UTF-8.
</rant>

rstoeck’s picture

Yes, that is what I wondered, since the reporting function works fine with my Debian test box at home with MySQL 4. You're right and I am looking into upgrading, which seems to require going from FC2 to FC3 to keep things clean. I didn't have very good luck with the previous Fedora upgrade, however, and I am trying to figure out what might break in the middle of it, since the server is currently running two production sites.

ullgren’s picture

FIRST: I meant JOIN and nothing else =)
SECOND: I just check in a version into the CVS that uses standard SELECT instead of JOIN.
This version is *NOT* tested and has some dead links but I guess you want to check it out any way.

rstoeck’s picture

Yes, seems to work well. I can access the tables now. The edit link also works. I assume the "submission" "download" and "clear" links are the dead links you were referring to, as they do not work.

Thanks.

ullgren’s picture

Yes they are, setting this bug to closed.