select category2.code from category2 where foldername = '#arrTemp[x]#' SELECT hotels.ID, hotels.hotel, sum(points) as points FROM hotels INNER JOIN pointsAssigned ON hotels.ID = pointsAssigned.hotel WHERE 1 = 1 AND pointsAssigned.cat2 = '#arrFolder[1]#' AND pointsAssigned.cat2 = '#arrFolder[2]#' AND pointsAssigned.cat2 = '#arrFolder[3]#' AND pointsAssigned.cat2 = '#arrFolder[4]#' GROUP BY hotels.ID, hotels.hotel ORDER BY pointsAssigned.points ASC SELECT DISTINCT category2.code, category1.title as c1, category2.title as c2, category2.foldername, category1.intPos FROM category1 INNER JOIN category2 ON category1.code = category2.category1 WHERE category2.booShowInIndex = 1 GROUP BY c1, c2 ORDER BY intPos, category1.code ASC, category2.code ASC select category2.foldername FROM category2 INNER JOIN category1 ON category2.category1 = category1.code WHERE category1.intPos = 1 ORDER BY category2.code ASC select category2.foldername FROM category2 INNER JOIN category1 ON category2.category1 = category1.code WHERE category1.intPos = 2 ORDER BY category2.code ASC select category2.foldername FROM category2 INNER JOIN category1 ON category2.category1 = category1.code WHERE category1.intPos = 3 ORDER BY category2.code ASC select category2.foldername FROM category2 INNER JOIN category1 ON category2.category1 = category1.code WHERE category1.intPos = 4 ORDER BY category2.code ASC SELECT folderName FROM category2 INNER JOIN category1 ON category2.category1 = category1.code WHERE category2.title LIKE 'AAA%' ORDER BY category1.intPos Untitled Document
select distinct hotel from pointsassigned where cat2 = '#recIndex.code#' group by hotel
#recIndex.c1#
#recIndex.c2# (#recCount.RecordCount#)
#recIndex.c2# (#recCount.RecordCount#)
#recIndex.c2# (#recCount.RecordCount#)
ID Hotel
#recHotels.ID# #recHotels.hotel#