I am trying out views on drupal 4.6.5 with mysql 5.0.17. There seems to be some trouble with escaping the table names. For example, on the default tracker_tracker view I get these two errors:
user 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 '\users users ON n.uid = users.uid LEFT JOIN \node_comment_statistics node_commen' at line 1
query: SELECT count(*) as numrecs FROM node n LEFT JOIN \users users ON n.uid = users.uid LEFT JOIN \node_comment_statistics node_comment_statistics ON . = node_comment_statistics. WHERE n.status = '1' in /usr/local/drupal/src/drupal-4.6.5/includes/database.mysql.inc on line 66.
user 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 '\users users ON n.uid = users.uid LIMIT 0, 10' at line 1
query: SELECT DISTINCT(n.nid), n.title AS n_title, n.changed AS n_changed, n.created AS n_created, users.name AS users_name FROM node n LEFT JOIN \users users ON n.uid = users.uid LIMIT 0, 10 in /usr/local/drupal/test/includes/database.mysql.inc on line 72.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | views.escape.patch | 441 bytes | starbow |
Comments
Comment #1
starbow commentedTurns out php5 handle escaping differently. Merlin pointed the way to the fix.
Comment #2
merlinofchaos commentedComment #3
(not verified) commented