class.udb.php:188 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 'AND sites.siteID NOT IN(0)
GROUP BY sites.siteid
/*ORDER BY free DESC ,' at line 13
SELECT `tmp`.* FROM (SELECT sites.siteType, sites.accessories, sites_text.title, sites_text.picture, sites_text.siteid,sites.rooms, sites_text.address, sites_text.phone, sites_text.siteAltPic, sites_text.siteTitlePic,sites.home_line,
sites.home_line_show, sites.home_line2, sites.home_line2_show,
sites.GalleryID1, sites.GalleryID2, sites.GalleryID3, sites.GalleryID4, sites.GalleryID5, sites.GalleryID6, sites.GalleryID7, sites.GalleryID8, sites.GalleryID9, sites.GalleryID10, sites.GalleryID11, sites.GalleryID12,
sites.title as `dk90_title`, sites.picture as `dk90_picture`, sites.phone as `dk90_phone`, sites.siteAltPic as `dk90_siteAltPic`, sites.siteTitlePic as `dk90_siteTitlePic`,
city, currency, sites.area,cities.title as `cityTitle`, datesCal.free, datesCal.date, turbo_new.posted AS `sorted`
FROM sites
INNER JOIN sites_text ON(sites.siteid = sites_text.siteid AND sites_text.PortalID=2 AND sites_text.LangID=1 AND sites_text.ifShow=1)
INNER JOIN cities ON (sites.city = cities.id)
LEFT JOIN datesCal ON(sites_text.siteid = datesCal.siteID AND datesCal.date='26-04-04')
LEFT JOIN turbo_new ON (sites.siteid = turbo_new.siteID AND turbo_new.posted=1)
LEFT JOIN `pirsumim` ON (sites.siteid = pirsumim.siteID AND pirsumim.PortalID = 2 AND pirsumim.pirsumType = 5)
WHERE AND sites.siteID NOT IN(0)
GROUP BY sites.siteid
/*ORDER BY free DESC , RAND()*/
) as `tmp`
LEFT JOIN packages ON(packages.siteID = tmp.siteid)
LEFT JOIN packages_periods as `p` ON(p.packageID = packages.packageID AND p.active=1 AND p.periodID='-1' )
GROUP BY tmp.siteid
/*ORDER BY posted DESC, free DESC ,RAND()*/
ORDER BY `sorted` DESC, RAND()
LIMIT 0,24
1: class.udb.php:317 udb::query()
2: class.udb.php:311 udb::single_list()
3: js_ajax_res.php:127 udb::full_list()