Server shutdown in progressselect houses.*, typesofhouses.type, typesofhouses.commercial, IF(agent_id > 0, 1, 0) as 'agent1' from pixilink_360.houses left join pixilink_360.typesofhouses on (typesofhouses.house_type = houses.type) where mls = 'R2715817' and (agent_id = 4978 or agent_id2 = 4978 or is_pixilink = 'y') and is_deleted <> 1 order by agent1 desc, house_id desc