<?php
$sql = "SELECT * FROM `tblcompany` c,`tbljob` j WHERE c.`COMPANYID`=j.`COMPANYID` AND COMPANYNAME LIKE '%" . $COMPANYNAME . "%' ORDER BY DATEPOSTED DESC";
$mydb->setQuery($sql);
$cur = $mydb->loadResultList();
foreach ($cur as $result) {
?>