string(1060) "
SELECT a.ID, b.meta_value*1 as med_license,
c.meta_value as doctor_status
FROM wp_4_posts a
INNER JOIN wp_4_postmeta b ON a.ID = b.post_id AND b.meta_key = '_med_license_number'
LEFT JOIN wp_4_term_relationships tr ON (a.ID = tr.object_id)
LEFT JOIN wp_4_term_relationships tr2 ON (a.ID = tr2.object_id)
INNER JOIN wp_4_postmeta c ON a.ID = c.post_id AND c.meta_key = '_doctor_staus_order'
WHERE a.post_status = 'publish'
AND a.post_type ='bch_doctor'
AND ( tr.term_taxonomy_id IN (0)
OR
tr2.term_taxonomy_id IN (0)
)
GROUP BY a.ID
ORDER BY
doctor_status ASC,
med_license ASC
"
Our Spring Sale Has Started
You can see how this popup was set up in our step-by-step guide: https://wppopupmaker.com/guides/auto-opening-announcement-popups/