Warning for OG charting when having multiple content types as Group type. :

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 ' 'page' ORDER BY created DESC' at line 2 query: SELECT type, created FROM node WHERE created >= 1299505317 AND type NOT LIKE 'image', 'page' ORDER BY created DESC in C:\xampp\htdocs\projects\demo\sites\all\modules\quant\quant.module on line 149.

Fix :
Query needs to be fixed in quant.quants.inc as :
From :

$query = "SELECT " . implode(', ', $additional_fields) . " FROM {node} WHERE created >= %d 
      AND type NOT LIKE '" . implode('\', \'', $omit) . "' ORDER BY created DESC";

to

$query = "SELECT " . implode(', ', $additional_fields) . " FROM {node} WHERE created >= %d 
      AND type NOT IN ('" . implode('\', \'', $omit) . "') ORDER BY created DESC";
 

Comments

mstef’s picture

Looks like you're right - will fix. Thanks.

mstef’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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