Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
5.x-1.6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Aug 2007 at 07:44 UTC
Updated:
30 Dec 2008 at 15:48 UTC
hi all,
this is my argument handling code:
if (isset($args[0])) {
views_view_add_filter($view, 'node', 'nid', '=', $args[0], '');
views_sanitize_view($view);
}
return $args;
and get the following SQL-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 '= '53') ORDER BY node_created_created DESC LIMIT 0, 10' at line 1 query: SELECT DISTINCT(node.nid), node.created AS node_created_created FROM node node LEFT JOIN term_node term_node ON node.nid = term_node.nid LEFT JOIN term_hierarchy term_hierarchy ON term_node.tid = term_hierarchy.tid WHERE (node.status = '1') AND (node.type IN ('story')) AND (term_node.tid IN ('3','15','14')) AND (.nid = '53') ORDER BY node_created_created DESC LIMIT 0, 10 in
it seems that the table name is not accepted.
Comments
Comment #1
mr.cake commentedI couldnt solve this problem but found a good workaround. Filtering by node-ids could be also done as jtomlinson described here: http://drupal.org/node/131482#comment-215435:
Assuming you are using Views module, add a "Node:ID" argument type to your view. In the Option dropdown, select "Not Equal". Then place the following in the Argument Handling Code:
thanks jtomlinson for this post!
Comment #2
sunSorry, unfortunately this support request is way too specific. Please have a look at the issue queue - Views maintainers are buried already. You might want to try to get further support at http://drupal.org/support.
If you were able to solve this issue on your own in the meantime, you might want to add the involved steps to this closed issue, so other users searching for a similar solution might find it.
Comment #3
digitalfrontiersmediaI don't know if this is still an issue in the most recent version or not, but for those still experiencing it, the reason (and suggested patch) for this bug is here:
http://drupal.org/node/150517