If the Drupal database was installed with a prefix, as in my case where I added "intranet", the query below will break because there is no table called "term_node". It is, in my case, called "intranetterm_node".
* user warning: Table 'intranet.term_node' doesn't exist query: SELECT COUNT(*) FROM intranetnode WHERE status = 1 AND nid in (SELECT * FROM (SELECT DISTINCT nid FROM `term_node` WHERE tid in (4)) AS finalTable) in /var/www/html/intranet/includes/database.mysqli.inc on line 151.
* user warning: Table 'intranet.term_node' doesn't exist query: SELECT nid FROM intranetnode WHERE status = 1 AND nid in (SELECT * FROM (SELECT DISTINCT nid FROM `term_node` WHERE tid in (4)) AS finalTable) LIMIT 0, 10 in /var/www/html/intranet/includes/database.mysqli.inc on line 151.
The actual SQL query is this one:
SELECT COUNT(*)
FROM intranetnode
WHERE status = 1
AND nid in (SELECT * FROM (SELECT DISTINCT nid FROM `term_node` WHERE tid in (4))
AS finalTable);
Comments
Comment #1
alexh commentedI could fix that by changing line 252 to this:
But the autocomplete still does not work for me, don't know if this is related.
Comment #2
summit commentedHi,
I could solve this by just changing:
to
So only adding {} was enough.
greetings,
Martijn
Comment #3
roychri commentedI've committed the changes to the D5 branch and HEAD.
Thank you.