PHP search option

I am trying to modify our latest jobs script to actually show only jobs with high salary (option 10 in salary table)I was wondeiring if anyone will be kind enough to help me rewrite this code to do just that?
Thanks in advance.
$sql = “SELECT * FROM “.JOB_TABLE.”
LEFT JOIN (”.JBC_TABLE.", “.JBL_TABLE.”, “.JBS_TABLE.”, “.JBP_TABLE.”)
ON (".JBC_TABLE.".".JOB_TABLE."_id=".JOB_TABLE.".".JOB_TABLE."_id
AND “.JBL_TABLE.”.".JOB_TABLE."_id=".JOB_TABLE.".".JOB_TABLE."_id
AND “.JBS_TABLE.”.".JOB_TABLE."_id=".JOB_TABLE.".".JOB_TABLE."_id
AND “.JBP_TABLE.”.".JOB_TABLE."_id=".JOB_TABLE.".".JOB_TABLE."_id)
WHERE “.JOB_TABLE.”_display = ‘1’
GROUP BY “.JOB_TABLE.”.".JOB_TABLE."_id
ORDER BY “.JOB_TABLE.”_rank DESC
LIMIT 5";

$res=$_Db->execute($sql);
$total = $_Db->numResults($res);

if($_Db->numResults($res)>0) {

$co = 0;
while($row=$_Db->fetchAssoc($res)) {	

	$jobs[$co]["id"]=$row[JOB_TABLE."_id"];
	$jobs[$co]["title"]=$row[JOB_TABLE."_title"];
	$jobs[$co]["product"]=getCatLocSecTitle($_Db, PDT_TABLE, $row[PDT_TABLE."_id"]);
	$jobs[$co]["salary"]=getCatLocSecTitle($_Db, SAL_TABLE, $row[SAL_TABLE."_id"]);
	
	$co++;
	
}

}

I need a little more to go on

What’s the difference between these tables JBC_TABLE, JBL_TABLE, JBS_TABLE, JBP_TABLE?

and what column is Option 10 Stored in?

Please post an sql dump of your database and a few sample records along with the complete code.

Sponsor our Newsletter | Privacy Policy | Terms of Service