Query error

paulo_graca - September 4, 2007 - 15:29
Project:View - Theme
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:paulo_graca
Status:active
Description

Hi!

After I changed the multilanguage support on, i started receiving an mysql error as it follows:
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 'WHERE node.nid = 55' at line 1 query: WHERE node.nid = 55 in /includes/database.mysql.inc on line 172.

I found out that viewtheme_nodeapi function was retreiving this error.
I've just add the following validation:

elseif ($view['countquery'] != '') {
     $query = $view['countquery'] . "WHERE node.nid = {$node->nid}";
  }

This will work on website:
http://www.plux.info

 
 

Drupal is a registered trademark of Dries Buytaert.