Community & Support

APK error: user warning: Unknown table 'users' in group statement query:...

Drupal 5.16
APK

Anyone have any ideas about this error on the user profile page.

user warning: Unknown table 'users' in group statement query: SELECT count(node.nid) AS num_nodes, node_comment_statistics.last_comment_timestamp AS node_comment_statistics_last_comment_timestamp_last_comment_timestamp, node.type AS node_type, node.title AS node_title, node.changed AS node_changed, node_comment_statistics.comment_count AS node_comment_statistics_comment_count, node_comment_statistics.last_comment_timestamp AS node_comment_statistics_last_comment_timestamp FROM node node LEFT JOIN comments comments ON node.nid = comments.nid AND comments.uid = '2' INNER JOIN buddylist baj_node_buddylist ON node.uid = baj_node_buddylist.buddy LEFT JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid WHERE (node.status = '1') AND (node.type IN ('usernode')) AND (node.uid = '2' OR comments.uid = '2') GROUP BY users.name, node_comment_statistics_last_comment_timestamp_last_comment_timestamp ORDER BY node_comment_statistics_la in /nfs/c01/h09/mnt/5120/domains/drupal/includes/database.mysql.inc on line 174.

I don't even know where to begin.

Thanks,
Ralph

Comments

.

It looks like you have a mixture of prefixed and non prefixed tables. Possibly the query is forggetting the brackets on some of the tables? That query isn't part of APK. It looks like something that counts the number of nodes posted by buddies of the user maybe? Not sure... It's hard to read that mass of SQL.

Michelle

-----
Shell Multimedia - My sporadically updated mostly Drupal blog.

I turned off Buddy list

I turned off Buddy list but, that did nothing. Have any idea as to where to start?

Thanks,
Ralph

Grep?

If you know how to use grep, you can search for the query. Just look for the very begining as the rest would be dynamically inserted.

Other that, no idea. The query doesn't look familiar.

Michelle

-----
Shell Multimedia - My sporadically updated mostly Drupal blog.

Don't know about "grep" but,

Could it be that I am using "Buddylist 2" instead of "Buddylist"?

Don't know about "grep" but, I will research it.

Thanks again,

Ralph

PS you can disregard the similar post in APK issues.

.

Depends what you're trying to do with Buddylist. APK works with Buddylist 1, not 2, but that query isn't part of APK so it's hard to say if it would make any difference.

Michelle

-----
Shell Multimedia - My sporadically updated mostly Drupal blog.

Error has expanded!

I logged in as another user and got this on my profile page... expanded admin profile error above:

* user warning: 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 'INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((n' at line 1 query: INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 31 AND na.realm = 'user_relationship_node_access_author'))) LIMIT 0, 5 in /nfs/c01/h09/mnt/5120/domains/drupal/includes/database.mysql.inc on line 174.
* user warning: Unknown table 'users' in group statement query: SELECT count( DISTINCT(node.nid)) AS num_nodes, node_comment_statistics.last_comment_timestamp AS node_comment_statistics_last_comment_timestamp_last_comment_timestamp, node.type AS node_type, node.title AS node_title, node.changed AS node_changed, node_comment_statistics.comment_count AS node_comment_statistics_comment_count, node_comment_statistics.last_comment_timestamp AS node_comment_statistics_last_comment_timestamp FROM node node LEFT JOIN comments comments ON node.nid = comments.nid AND comments.uid = '31' INNER JOIN buddylist baj_node_buddylist ON node.uid = baj_node_buddylist.buddy LEFT JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 31 AND na.realm = 'user_relationship_node_access_author'))) AND ( (node.status = '1') AND (node. in /nfs/c01/h09/mnt/5120/domains/drupal/includes/database.mysql.inc on line 174.

Anyone have any ideas on how to rectify this?

Same error

It's the same problem. It's just got more to it because node access is kicking in.

Michelle

-----
Shell Multimedia - My sporadically updated mostly Drupal blog.

had same problem i think

had same problem i think after firs install.

had to enable comments module.

Madalin Ignisca,
drupal lover

nobody click here