include 'session_keep.php';
include 'inc_functions.php';
include 'inc_db.php';
if(isset($_GET["index"]))
{
$index = $_GET["index"];
}
$Connect = mysql_connect($DB_Server, $DB_Username, $DB_Password) or die("Internal Error, Erro code 1, Go back and try again");
// Select database
$db_selected = mysql_select_db($DB_DBName, $Connect) or die("2");
if(!$Connect){ die ('Couldnt connect'.mysql_error());}
if(isset($index))
{
$start = $index-5;
$end = 5;
$sqlHot = 'SELECT * from job_information order by job_id limit '.$start.','.$end;
}
else
{
$sqlHot = 'SELECT * from job_information order by job_id limit 0,5';
}
$viewHot = mysql_query($sqlHot, $Connect );
if (!$viewHot) {
echo "DB Error, could not query the database\n";
echo 'MySQL Error: ' . mysql_error();
exit;
}
$num_Hot = mysql_num_rows($viewHot);
$sqlAll = 'SELECT * from job_information order by job_id';
$viewAll = mysql_query($sqlAll , $Connect );
if (!$viewAll) {
echo "DB Error, could not query the database\n";
echo 'MySQL Error: ' . mysql_error();
exit;
}
$num_All = mysql_num_rows($viewAll);
?>
Job Title |
No comments:
Post a Comment