When deleting a vocabulary term with aggregator2-module on I get this error:
Fatal error: 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 '' at line 1 query: SELECT vid, tid FROM term_data WHERE tid = in /var/www/medlemmer.artofliving.no/aolweb/includes/database.mysql.inc on line 66
The following patch fixes it, but I'm unsure if it's the correct way.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | aggregator2.module_1_0.patch | 507 bytes | franks2 |
| aggregator2.module_1.patch | 505 bytes | franks2 |
Comments
Comment #1
buddaIt looks like the right fix. However variables used in DB queries should be passed in as extra parameters to db_query() to ensure they are escaped correctly.
Check the description at http://api.lullabot.com/api/HEAD/function/db_query for more info on how to pass parameters to a SQL statement.
Comment #2
franks2 commentedOk. here is an updated patch with the escape.