include('menu.php'); ?> |
include('link.php'); ?> |
include('login.php'); ?> |
|
ค้นหาแบบติดตามผลนักเรียน/นักศึกษาที่สำเร็จการศึกษา |
|
$name = $_POST['name'];
$select = $_POST['select'];
$strSQL = "SELECT * FROM alumni WHERE 1";
if($_POST["ddlSelect"] != '' and $_POST["txtKeyword"] != '')
{
$strSQL .= " AND (".$_POST["ddlSelect"]." LIKE '%".$_POST["txtKeyword"]."%' ) ";
}
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$Num_Rows = mysql_num_rows($objQuery);
$Per_Page = 20; // Per Page
$Page = $_GET["Page"];
if(!$_GET["Page"])
{
$Page=1;
}
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_Start = (($Per_Page*$Page)-$Per_Page);
if($Num_Rows<=$Per_Page)
{
$Num_Pages =1;
}
else if(($Num_Rows % $Per_Page)==0)
{
$Num_Pages =($Num_Rows/$Per_Page) ;
}
else
{
$Num_Pages =($Num_Rows/$Per_Page)+1;
$Num_Pages = (int)$Num_Pages;
}
$strSQL .=" LIMIT $Page_Start , $Per_Page";
$objQuery = mysql_query($strSQL);
$a=1;
?>
|
ลำดับ |
รหัส |
ชื่อ - สกุล |
พิมพ์ |
while($objResult = mysql_fetch_array($objQuery))
{
?>
|
|
|
$id_alumni=$objResult["id_alumni"];
echo"";?>
|
$a++; }?>
|
|
Total
Record
$pages = new Paginator;
$pages->items_total = $Num_Rows;
$pages->mid_range = 10;
$pages->current_page = $Page;
$pages->default_ipp = $Per_Page;
$pages->url_next = $_SERVER["PHP_SELF"]."?QueryString=value&Page=";
$pages->paginate();
echo $pages->display_pages()
?>
|
|
|
|