$r = "SELECT DISTINCT location FROM above_beyond_2015 WHERE oem = '" . addslashes($oem-?>oem_name) . "' ORDER BY 1;";
$locs = db_query($r);
foreach($locs as $loc){ ?>
location; ?>
$s = "SELECT DISTINCT name FROM above_beyond_2015
WHERE oem = '" . addslashes($oem-?>oem_name) . "' AND location = '" . addslashes($loc->location) . "'
ORDER BY 1;";
$names = db_query($s);
foreach($names as $name){ ?>
name; ?>
name) . "' AND location = '" . addslashes($loc->location) . "';";
$comments = db_query($t);
foreach($comments as $comment){
if(!empty($comment->comment)) { ?>
“comment; ?>”
} // end comments foreach
} // end name foreach
} // end loc foreach ??>