[insert_php]
$connArr = explode(‘:’, DB_HOST);
$conn = new mysqli($connArr[0], DB_USER, DB_PASSWORD, DB_NAME);
mysqli_set_charset($conn,”utf8″);
$sql_count = “SELECT distinct vd.website
FROM vendor_data vd
JOIN vendor_programs vp
ON vd.vendor_id = vp.vendor_id AND vp.program_id = 30
WHERE is_active = 1 AND is_public <> 1 AND in_house = 1″;
$result_count = $conn->query($sql_count);
$showAllSQL = “”;
if (mysqli_num_rows($result_count) >= 20){
$showAllSQL = ” AND in_house = 1 “;
}
$sql = “SELECT *,
CASE WHEN ((media1_link != ” AND media1_link != ‘NULL’) OR (media2_link != ” AND media2_link != ‘NULL’) OR (media3_link != ” AND media3_link != ‘NULL’)) AND ((snapshot1_id != ” AND snapshot1_id != ‘NULL’) OR (snapshot2_id != ” AND snapshot2_id != ‘NULL’) OR (snapshot3_id != ” AND snapshot3_id != ‘NULL’)) AND has_docs > 0 THEN 3
WHEN (((media1_link != ” AND media1_link != ‘NULL’) OR (media2_link != ” AND media2_link != ‘NULL’) OR (media3_link != ” AND media3_link != ‘NULL’)) AND ((snapshot1_id != ” AND snapshot1_id != ‘NULL’) OR (snapshot2_id != ” AND snapshot2_id != ‘NULL’) OR (snapshot3_id != ” AND snapshot3_id != ‘NULL’))) OR (((media1_link != ” AND media1_link != ‘NULL’) OR (media2_link != ” AND media2_link != ‘NULL’) OR (media3_link != ” AND media3_link != ‘NULL’)) AND has_docs > 0) OR (((snapshot1_id != ” AND snapshot1_id != ‘NULL’) OR (snapshot2_id != ” AND snapshot2_id != ‘NULL’) OR (snapshot3_id != ” AND snapshot3_id != ‘NULL’)) AND has_docs > 0) THEN 2
WHEN ((media1_link != ” AND media1_link != ‘NULL’) OR (media2_link != ” AND media2_link != ‘NULL’) OR (media3_link != ” AND media3_link != ‘NULL’)) OR ((snapshot1_id != ” AND snapshot1_id != ‘NULL’) OR (snapshot2_id != ” AND snapshot2_id != ‘NULL’) OR (snapshot3_id != ” AND snapshot3_id != ‘NULL’)) OR has_docs > 0 THEN 1
ELSE 0 END as media,
CASE WHEN vp.in_house = 1 AND vp.stand_alone = 1 THEN 1 ELSE 0 END as in_house_alone
FROM vendor_data vd
JOIN vendor_programs vp
ON vd.vendor_id = vp.vendor_id AND vp.program_id = 30
WHERE is_active = 1
AND is_public <> 1
AND vd.vendor_id IN (
SELECT MIN(B.vendor_id) as vendor_id FROM vendor_data B
WHERE B.website = vd.website)
$showAllSQL
ORDER BY in_house_alone DESC, preferred DESC, MAV DESC, media DESC, last_updated DESC, name ASC”;
$result = $conn->query($sql);
[/insert_php]
TOP CORPORATE WEIGHT LOSS CHALLENGE AND WEIGHT MANAGEMENT PROGRAMS
Shortlister is trusted by employers and employee benefits consultants to identify their optimal vendor based on their budget,
demographics and program goals. Leverage our expertise to save yourself the time and hassle of navigating the crowded vendor marketplace.
×
Need Help?
Shortlister helps thousands of employers find the right vendor every year. We efficiently and accurately identify the shortlist of vendors that can meet your program goals and guide you through the selection process.
[insert_php]
if (count($result)){
while($row = $result->fetch_assoc()){
if(strlen($row[‘summary’]) > 415){
$summary = substr($row[‘summary’], 0, 415).’…’;
}
else{
$summary = $row[‘summary’];
}
echo’
‘.$row[‘name’].’ ‘;
if ($row[‘has_docs’]){ echo ‘
Profile includes marketing materials
‘; };
if (($row[‘snapshot1_id’] && $row[‘snapshot1_id’] != “NULL”) || ($row[‘snapshot2_id’] && $row[‘snapshot2_id’] != “NULL”) || ($row[‘snapshot3_id’] && $row[‘snapshot3_id’] != “NULL”)){ echo ‘
Profile includes screenshots
‘; };
if (($row[‘media1_link’] && $row[‘media1_link’] != “NULL”) || ($row[‘media2_link’] && $row[‘media2_link’] != “NULL”) || ($row[‘media3_link’] && $row[‘media3_link’] != “NULL”)){ echo ‘
Profile includes video
‘; };
echo ‘
☆☆☆☆☆ This information is only available to authorized Shortlister users
‘.$summary .’
‘;}}
[/insert_php]