Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm new here, so pl. let me know if I'm doing something wrong.
I'd been seeing a recurring SQL SELECT error message every time I updated the directory settings. Also noticed that the node counts were not displaying.
I traced it to the function and the SQL queries:
$result = db_query(db_rewrite_sql('SELECT t.tid, n.nid FROM {term_node} t JOIN {node} n ON t.nid = n.nid WHERE n.status = 1', 't', 'tid'));
which I changed to:
$result = db_query(db_rewrite_sql('SELECT t.tid, n.nid FROM {term_node} t LEFT JOIN {node} n ON t.nid = n.nid WHERE n.status = 1', 't', 'tid'));
essentially adding the LEFT keyword to JOIN.
I tried this first with the official release version and then with the dev version with identical results.
Was this an oversight, incorrect code version or a real bug?
Thanks
Comments
Comment #1
beginner CreditAttribution: beginner commentedHello fsiddiqi, thanks for the report.
Since it is a SQL error, it would be appropriate to give the SQL engine (mysql?) and version that you are using.
Also, can you copy the exact error message that you get?
Thank you for providing a solution, too.
Comment #2
Openlogic CreditAttribution: Openlogic commentedSorry I should have specified.
This problem occurred for me on MySQL 3.23 and was reported as a SQL syntax error.
Thanks
Comment #3
beginner CreditAttribution: beginner commentedMySQL 3.x is no longer supported by Drupal.
See the new D6 alpha release announcement:
http://drupal.org/node/283259
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.