Sometimes received this warning:
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 (n.language ='es' OR n.language ='' OR n.language IS NULL)' at
line 1 query: SELECT COUNT(*) as count from node where type = 'story' WHERE
(n.language ='es' OR n.language ='' OR n.language IS NULL)
in /mnt/disk2/pruebas/utplsite/modules/sioc/sioc.module on line 521.
What happend it ?
Comments
Comment #1
Cloud commented"where type = 'story'" WHERE should be "where type = 'story' AND"
Not sure why that is happening...
Comment #2
Cloud commentedIn the Drupal 5 and 6 modules, the line:
$stories_counter = db_result(db_query('SELECT COUNT(*) as count from {node} where type=\'story\''));
was changed to:
$stories_counter = db_result(db_query(db_rewrite_sql('SELECT COUNT(*) as count from {node} where type=\'story\'')));
I'm not sure what the effect will be of removing the rewrite function...
scor, any ideas?