SELECT SQL_CALC_FOUND_ROWS
( SELECT GROUP_CONCAT(DISTINCT '<img alt="Adornment" src="',adornments.url,'"/>' ORDER BY adornments.adornment_id ASC SEPARATOR ' ') FROM ge_dev_user_adornments AS user_adornments JOIN ge_dev_adornments AS adornments ON adornments.adornment_id=user_adornments.adornment_id WHERE user_adornments.user_id=users.user_id ) AS '',
CONCAT('<a ',IF(highlight IS NOT NULL,'class="geHl geBold" ',''),' href="exhibitor/viewExhibitorProfile.php?__id=',exhibitors.__id,'">',exhibitors.display_name,'</a>') AS 'Company Name',
GROUP_CONCAT(DISTINCT '<a href="floorPlan/viewFloorPlan.php?ei=',exhibitors.__id,'&zb=',floor_plan_booths.booth_number,'">',floor_plan_booths.booth_number,'','</a>' SEPARATOR '<br/>') AS 'Booth Number'
,CONCAT('
<script type="text/javascript">
GeJsLoader.loadModule(\'GeGuiMediator\');
document.write(GeGuiMediator.getAddUserToPlannerHtml(',exhibitors.contact_id,',',IF(planners.id IS NULL,'false','true'),'));
</script>
') AS ''
FROM
ge_dev_exhibitors AS exhibitors
LEFT JOIN ge_dev_booth_assignments AS booth_assignments ON booth_assignments.exhibitor_id=exhibitors.__id
LEFT JOIN ge_dev_floor_plan_booths AS floor_plan_booths ON floor_plan_booths.fp_booth_id=booth_assignments.fp_booth_id
LEFT JOIN ge_dev_floor_plan_areas AS floor_plan_areas ON floor_plan_areas.area_id=floor_plan_booths.area_id
LEFT JOIN ge_dev_users AS users ON users.user_id=exhibitors.contact_id LEFT JOIN ge_dev_planners AS planners ON (planners.in_planner_user_id=exhibitors.contact_id AND planners.user_id='')
LEFT JOIN ge_dev_exhibitor_matcher_profiles AS exhibitor_matcher_profiles ON exhibitor_matcher_profiles.contact_id=exhibitors.contact_id
JOIN ge_dev_person_profiles AS person_profiles ON person_profiles.user_id=users.user_id
WHERE
users.status='Active'
AND exhibitors.hide_from_lists IS NULL
AND categories LIKE BINARY '%Die Bonding Equipment%' GROUP BY exhibitors.__id ORDER BY `3` ASC