SELECT IFNULL(m.Biz_Descript, '') description, m.Franchise_ID id, m.Company company, m.Street street, m.City city, l.Geo_ID provinceId, l.Territory_Short prov, m.Country_ID countryId,
t.Territory country, m.Zip zip,
m.Main_Tel mainTel, m.Main_Fax mainFax, m.Main_Tel_800 mainTel800, m.Main_Fax_800 mainFax800, m.Main_Email mainEmail, m.web web,
m.YR_Estab YREstab, g.Category_ID cateId, g.Category category, g.Parent_ID top_cateId, IFNULL(logo, '') sponsoredlinkLogo, online_startdate, online_enddate, CASE WHEN ( CURDATE() BETWEEN online_startdate AND online_enddate) THEN '1' ELSE 0 END As adv_status,
TRIM(CONCAT(IFNULL(Contact_FN,''), ' ', IFNULL(Contact_LN,''))) contact, TRIM(CONCAT(Contact_Tel, ' ',IFNULL(Contact_Ext, ''))) contactTel, Contact_Email contactEmail, membership,
CASE g.Parent_ID WHEN 2 THEN 'Professional Services Providers' WHEN 4 THEN 'Business Supplies Providers'
END AS top_category
FROM main m
LEFT JOIN (SELECT GROUP_CONCAT(Memb_Short SEPARATOR ', ') membership, Franchise_ID mFid FROM memb_franchise x, member y WHERE x.Member_ID = y.Member_ID GROUP BY Franchise_ID) a ON mFid = m.Franchise_ID
LEFT JOIN contact c ON c.Franchise_ID = m.Franchise_ID AND c.contact_id = 1
LEFT JOIN category g ON g.Category_ID = m.Category_ID
LEFT JOIN geo_territory l ON l.Geo_ID = m.Prov_ID
LEFT JOIN geo_territory t ON t.Geo_ID = m.Country_ID AND t.Parent_ID = 0
LEFT JOIN memb_franchise b ON b.Franchise_ID = m.Franchise_ID
WHERE m.Franchise_ID = 'F09059' GROUP BY m.Franchise_ID
Get franchise news delivered right to your inbox! Sign-up for our twice-monthly newsletter.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
This cookie is native to PHP applications. The cookie is used to store and identify a users' unique session ID for the purpose of managing user session on the website. The cookie is a session cookies and is deleted when all the browser windows are closed.
This cookie is used to check if the cookies are enabled on the users' browser.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
YouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data.
The _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors.
This cookie is installed by Google Universal Analytics to restrain request rate and thus limit the collection of data on high traffic sites.
A variation of the _gat cookie set by Google Analytics and Google Tag Manager to allow website owners to track visitor behaviour and measure site performance. The pattern element in the name contains the unique identity number of the account or website it relates to.
Installed by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously.