Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT nc.web_name AS company_name,
- IF((b.booth_number LIKE '%Cafe%', b.booth_number, substring(b.booth_number,4)) AS booth_number,
- nc.site_url AS website, IF (nc.ismi_status = 1, 'Member','') AS member_status
- FROM booth_sale bs JOIN {ismi.booth} b ON bs.booth_id = b.booth_id
- JOIN ismi.new_people np ON bs.contact_id = np.id
- JOIN ismi.new_company nc ON nc.id = np.company_id
- WHERE b.show_event_id = 298 AND status IN(44,45) ORDER BY 3
- IF((b.booth_number = 'Cafe', b.booth_number, substring(b.booth_number,4)) AS booth_number
- ...
- IF(b.booth_number LIKE '%Cafe%', b.booth_number, substring(b.booth_number,4)) AS booth_number,
- ...
Add Comment
Please, Sign In to add comment