Forum Moderators: open
I'm getting this error (in a joomla search component - advanced search). It did work fine when i first made the website but all of a sudden it has stopped working and I get this nasty message:
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 \')\' at line 1 SQL=SELECT count(u.id) FROM jos_users u, jos_comprofiler ue WHERE u.id=ue.id AND u.block !=1 AND ue.approved=1 AND ue.banned=0 AND ue.confirmed=1 AND u.gid IN ()
Can anyone suggest what to do?
Thank you soooo much in advance
I'll be honest, I don't really understand what this means. Do you need some more information?
this is the corresponding code:
$database->setQuery("SELECT count(u.id) FROM #__users u, #__comprofiler ue WHERE u.id=ue.id AND u.block !=1 AND ue.approved=1 AND ue.banned=0 AND ue.confirmed=1 AND u.gid IN (".$usergids.")");
$total_results = $database->loadResult();
Thanks
I think its to do with an upgrade from php4 to php5.
In cb_search.html.php around line 350, it says:
$allusergids = array_merge($allusergids,$groupchildren);
php4 is ok with this but php5 NEEDS to have the (array) keyword forced in. Therefore:
$allusergids = array_merge((array)$allusergids,(array)$groupchildren);
Thanks for the help