JOBS – Category

Failed to connect to DB server

“);
exit();
}

if (! @mysql_select_db(“londonnet”) ){
echo(“

Failed to find Database

“);
exit();
}

if($dbh){
//echo(“✓ Connected – to Jobs Server
“);
}

## Start listing jobs in category

$categorytype= stripslashes($_GET[‘cat’]);

if(!isset($categorytype)){
echo(“No Category Defined”);
}else{

echo(“

$categorytype Jobs

“);

$totalresults= mysql_query(“SELECT * FROM `jobs` WHERE `category` LIKE CONVERT(_utf8 ‘”.$categorytype.”‘ USING latin1) COLLATE latin1_swedish_ci”);

$num_rows = mysql_num_rows($totalresults);
//echo “Number of jobs in this category : $num_rows

“;

/*while ( $row = mysql_fetch_array($result) ){
echo($row[“jobid”].”
“);
}
*/
}

include(“jobspaginator/paginator.php”);

include(“jobspaginator/paginator_html.php”);

$a =& new Paginator_html($_GET[‘page’],$num_rows);

$a->set_Limit(15);

$limit1 = $a->getRange1();

$limit2 = $a->getRange2();

//mysql_query(“SELECT * FROM `jobs` WHERE `category` LIKE $categorytype LIMIT $limit1, $limit2”);
$result=mysql_query(“SELECT * FROM `jobs` WHERE `category` LIKE CONVERT(_utf8 ‘”.$categorytype.”‘ USING latin1) COLLATE latin1_swedish_ci LIMIT $limit1, $limit2″);

echo(‘

‘);

while ( $row = mysql_fetch_array($result) ){

if ($alternate == “1”) {
$colour = “#FFF3CA”;
$alternate = “2”;
}else {
$colour = “#ffffff”;
$alternate = “1”;
}

echo(“

“);

echo(“

“);

echo(“

“);

}

echo(“

” . $row[“jobtitle”] . “
“);
echo(“Location: ” . $row[“location”] . “
“);
if($row[“contactemail”]!=””){echo(“Contact:” . $row[“contactemail”] . ”
“);}
echo(“Salary/Rate:” . $row[“salary_rate”] . ”
“);
echo substr($row[“jobdescription”], 0, 254);
echo(“

“);

## Output pagers
$a->firstLast(); //style 1
//$a->previousNext(); //style 2

## Close Jobs DB connection
mysql_close($dbh);

echo(‘« Back to Jobs Home‘);

?>