Download & Extend

SQL Error Unknown column 'n.type'

Project:split_test
Version:5.x-3.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I received an SQL error after i installed the module. the error is:

user warning: Unknown column 'n.type' in 'where clause' query: SELECT COUNT(*) FROM split_test LEFT JOIN drigg_node dn2 ON dn2.dnid = n.nid WHERE ( 1=1 AND !(n.type='drigg' AND dn2.killed=1 ) ) AND ( !(n.type='drigg' AND n.created > UNIX_TIMESTAMP(CURRENT_TIMESTAMP()) ) ) in /includes/database.mysql.inc on line 174.

and

user warning: Unknown column 'n.type' in 'where clause' query: SELECT * FROM split_test LEFT JOIN drigg_node dn2 ON dn2.dnid = n.nid WHERE ( 1=1 AND !(n.type='drigg' AND dn2.killed=1 ) ) AND ( !(n.type='drigg' AND n.created > UNIX_TIMESTAMP(CURRENT_TIMESTAMP()) ) ) LIMIT 0, 20 in /www/htdocs/w009fcbc/includes/database.mysql.inc on line 174.

I was able to isolate the error and solve if by removing 'db_rewrite_sql' in line 93

Before:

  $result = pager_query(db_rewrite_sql($sql), 20, 0);

After:

  $result = pager_query($sql, 20, 0);

Just wanted to post this in case anyone runs into the same error.

Comments

#1

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.