ราคาขายสินค้า Promotion
| รหัสPro |
ชื่อPro |
ราคาขายที่ |
จากวันที่ |
ถึงวันที่ |
รหัสสินค้า |
ชื่อสินค้า |
หน่วย |
ราคาขาย |
ส่วนลด |
ราคาขายสุทธิ |
= GETDATE()) and (BCPromotionSub.ItemCode LIKE '%".$_GET["txtKeyword"]."%')";
$objExec = odbc_exec($dbh2,$strSQL) or die ("Error Execute [".$strSQL."]");
$Num_Rows = 0;
while(odbc_fetch_row($objExec))$Num_Rows++;
$Per_Page = 10000;
$Page = $_GET["Page"];
if(!$_GET["Page"])
{
$Page=1;
}
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_Start = (($Per_Page*$Page)-$Per_Page)+1;
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;
}
$Page_End = $Per_Page * $Page;
if($Page_End > $Num_Rows)
{
$Page_End = $Num_Rows;
}
?>
|
|
|
|
|
|
|
|
|
|
|
<< Back ";
}
for($i=1; $i<=$Num_Pages; $i++){
if($i != $Page)
{
// echo "[ $i ]";
}
else
{
// echo " $i ";
}
}
if($Page!=$Num_Pages)
{
//echo " Next>> ";
}
odbc_close($dbh2);
}
?>