Hi there,
I'm getting the following 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 ')) ORDER BY timestamp DESC' at line 1 query: SELECT timestamp FROM views_content_cache WHERE (()) ORDER BY timestamp DESC in /home/onsorui6/public_html/sites/all/modules/views_content_cache/views_content_cache.module on line 164.
Any idea what could that be?
thank you
Comments
Comment #1
crandallr commentedI have the same problem here on openscholar
Comment #2
humansky commentedI too am having the same issue. I got the error after I cleared the cache.
Comment #3
freescholar commentedSame error after cache clear.
using OpenScholar version of D6x 2.2
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 ')) ORDER BY timestamp DESC' at line 1 query: SELECT timestamp FROM views_content_cache WHERE (()) ORDER BY timestamp DESC in /home/freescho/public_html/sites/all/modules/contrib/views_content_cache/views_content_cache.module on line 164.
Comment #4
technikh commentedsame error in openscholar beta 13 http://openscholar.harvard.edu/software/download-openscholar/2-0-beta13
Comment #5
omnia.ibrahim commentedany updates why this error occurred?????
Comment #6
munyivaI had the same issue and i followed advice from the thread http://drupal.org/node/946020 , installed Views Content Cache version 6.x-2.x-dev.
I got the following error :
warning: Missing argument 2 for views_content_cache_key_og::view_key(), called in sites/all/modules/openscholar_vsite/vsite_menus/vsite_menus.module on line 446 and defined in sites/all/modules/contrib/views_content_cache/plugins/og.inc on line 39.
warning: Missing argument 2 for views_content_cache_key::view_key(), called in sites/all/modules/os/modules/os_blocks_content_cache/plugins/os_content_cache_context_reaction_block.inc on line 111 and defined in sites/all/modules/contrib/views_content_cache/plugins/base.inc on line 60.
So i went back to Views Content Cache Version 6.x-2.2
then added the following if statement before the SQL on line 165
if ($built_clause['#clause']!='(())') {
$cache[$hash] = db_result(db_query("SELECT timestamp FROM {views_content_cache} WHERE {$built_clause['#clause']} ORDER BY timestamp DESC", $built_clause['#args']));
}
Comment #7
steven jones commentedThis issue should be fixed in 6.x-2.x-dev
Comment #9
drupalycious commentedSorry for re-opening this issue but in 6.x-2.x-dev the warning that appears is the one described in #6:
With 6.x-2.x-dev the initial warning becomes:
and only by going back to Version 6.x-2.2 and adding the following if statement before the SQL on line 165
then the initial warning goes away.
so I just confirm that #6 is the present solution for this issue.
Thanks
Comment #10
rukayya commentedUser 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 'User143@example.com'' at line 1 query: SELECT uid, created FROM users WHERE name = 'Test'User143@example.com' in _db_query() in database.mysqli.inc
I am getting above warning plz do help