Notice: Undefined variable: pg_rec in /var/www/vhosts/sandyblue.com/httpdocs/includes/_sys_search.php on line 1283
Could not select GET_REC_NUM: 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 'GROUP BY av_gaps.acc_id ) AS gaps ON gaps.acc_id' at line 27 SQL USED: SELECT DISTINCT acc.ID AS rec_id##ALLFLDZ## FROM sbcomdb.Accommodation AS acc INNER JOIN sbcomdb.taxonomy AS prop_typ ON (prop_typ.tax_typ='prop_typ' AND prop_typ.id=acc.prop_typ) INNER JOIN sbcomdb.prop_lox AS loc_0 ON (loc_0.id = acc.prop_location) INNER JOIN sbcomdb.prop_lox AS loc_1 ON (loc_1.id = loc_0.parent_id) LEFT JOIN sbcomdb.prop_lox AS loc_2 ON (loc_2.id = loc_1.parent_id) ## LEFT JOIN ( SELECT av_gaps.id, av_gaps.acc_id, GROUP_CONCAT('[',DATE_FORMAT(av_gaps.date_arr,'%Y-%m-%d'),'][',DATE_FORMAT(av_gaps.date_dep,'%Y-%m-%d'),'][',av_gaps.text,']' ORDER BY av_gaps.date_arr ASC SEPARATOR '#') AS gap, COUNT(av_gaps.id) AS gaps_count FROM sbcomdb.av_gaps AS av_gaps WHERE av_gaps.pg_id = #GRPBY-6 GROUP BY av_gaps.acc_id ) AS gaps ON gaps.acc_id = acc.ID WHERE #2 acc.Deleted=0 AND acc.Archived=0 AND acc.ShowOnSite = 1 AND acc.IsPrivate = 0 AND gaps.gaps_count > 0 #GRPBY-9 GROUP BY rec_id\n\n