Fatal SQL error
| Project: | Views Tagadelic |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Error reported in the log:
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 ') GROUP BY term_data.tid, term_data.name, term_data.vid ORDER BY count DESC LIMI' at line 1 query: SELECT term_data.tid, COUNT(*) AS count, term_data.name, term_data.vid FROM node node INNER JOIN term_node term_node ON term_node.nid = node.nid INNER JOIN term_data term_data ON term_data.tid = term_node.tid WHERE term_data.vid IN (17625%) GROUP BY term_data.tid, term_data.name, term_data.vid ORDER BY count DESC LIMIT 0, 20 in <my path>/includes/database.mysql.inc on line 172.
The above line is in 'tagadelic_views.module' line 53.
Happens on every page that has a Tagadelic view.
My details:
Drupal: v5.7
MySQL: v5.0.27
PHP: v5.1.6
Problem seems to have turned up in the last update.

#1
...and here is the patch - it is a single character change. Clearly a typo.
#2
I applied a slightly different patch, but thanks for pointing this out.
#3
Nice patch, but there is a typo in it that will cause a NIL result:
$placeholders = implode(',', array_fill(0, count($vid), "%d"));Should actually be:
$placeholders = implode(',', array_fill(0, count($vids), "%d"));You want $vids instead of $vid
Do you want a patch?
#4
@kmv, Thanks for catching the typo! I checked in the updated fix.
#5
Automatically closed -- issue fixed for two weeks with no activity.