Support Forums

Bug in filter module?

This is a discussion on Bug in filter module? within the TemplateCodes forums, part of the Third Party Support category; Notice: Query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server ...


Go Back   68 Classifieds Forums > Third Party Support > TemplateCodes

Reply
 
Thread Tools Display Modes
Old 02-27-2010, 08:39 PM   #1
Customer
 
Join Date: Feb 2010
Posts: 25
Rep Power: 4
JWB is on a distinguished road
Default Bug in filter module?

Notice: Query failed: 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 rand() LIMIT 5' at line 1 SQL: SELECT id, title, price FROM class_listings WHERE display = 'Y' AND expiration > NOW() AND featured = 'Y' AND id IN () ORDER BY rand() LIMIT 5 in /home/***/public_html/includes/classes/database/mysql.php on line 144

I think there is some thing wrong with the home.tpl

It seems that the error comes when you filter a state - from where there exists no listings. If I choose a filter where there is a listing the error disappears.

The error also disappears when I deactivate the filter module in the admin panel - or as a user in the menu.
JWB is offline   Reply With Quote
Old 02-28-2010, 08:41 AM   #2
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,964
Rep Power: 73
seymourjames is a jewel in the rough
Default

An official solution will be posted here.

I know John sent you a fix but it is not working for me on our demo site whereas the unfixed version does seem to work fine. We will get to the bottom of it.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline   Reply With Quote
Old 02-28-2010, 12:26 PM   #3
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,964
Rep Power: 73
seymourjames is a jewel in the rough
Default

A fix is now available. Open modules/custom_plugins/plugins/function.css_listings_horizontal.php

Replace:

PHP Code:
unset($row);
$results->freeResult();
$lFilter ' AND id IN (' implode(','$pIds) . ') '

with

PHP Code:
unset($row);
$results->freeResult();
if (empty(
$pIds)) {
    return 
'<div class="alert">' MOD_LANG_NO_LISTINGS '</div>';
}
$lFilter ' AND id IN (' implode(','$pIds) . ') '
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds

Last edited by juven14; 02-28-2010 at 12:30 PM.
seymourjames is offline   Reply With Quote
Old 02-28-2010, 02:02 PM   #4
Customer
 
Join Date: Feb 2010
Posts: 25
Rep Power: 4
JWB is on a distinguished road
Default

Thank you. I can confirm the fix fixes the issue... :-)
JWB is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter module in deepsea sidebar jonten123 Templates, HTML, CSS, and Design Help 1 12-30-2009 07:05 PM
Location Filter Module seymourjames Modification Release 6 06-03-2009 07:06 AM
V4.1.x Filter Module wabugi Modules / Plugins / Modifications 3 06-01-2009 04:48 PM
Scam Filter module Error euroclassifieds Modules / Plugins / Modifications 1 07-07-2008 06:52 AM


All times are GMT -4. The time now is 10:28 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0