|
 |
|
ช่วยแก้โค๊ดด้วยน่ะค่ะ คือว่าเขียนโค๊ดแบ่งหน้าไว้ แล้วหน้าสองมันไม่แสดงข้อมูล ช่วยแก้ให้หน่อยน่ะค่ะ |
|
 |
|
|
 |
 |
|
หน้าสองมันแสดงข้อมูลอย่างงี้ค่ะ มันไม่ดึงข้อมูลมาให้

|
 |
 |
 |
 |
Date :
2009-12-24 13:26:24 |
By :
hatinee |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองเอาของผมไปใส่แทน แล้วเอาตัวเก่าบางบรรทัดออกนะครับ
Code (PHP)
$countPage = $Num_Rows / $Per_Page; //จำนวนหน้า
$Page_Start = ($Page - 1) * $Per_Page; // เปลี่ยนใช้แบบนี้ง่ายกว่านะครับ
$Num_Pages = ($Num_Rows / ($Per_Page*$Page));
$Num_Pages = round($Num_Pages,0); // หาว่าตอนนี้อยู่ที่หน้าไหน
// *** comment
//$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;
//}
|
 |
 |
 |
 |
Date :
2009-12-24 14:00:55 |
By :
aknueng |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
นีลองเอาโค๊ด ที่ Nueng ให้มาไปใส่แร้วน่ะค่ะ แต่ก็ยังเป็นเหมือนเดิม ถ้างัยรบกวนช่วยบอกหน่อยได้มั้ยค่ะว่าควรตัดบรรทัดไหนบ้าง เพราะว่าตัดไปแร้วหน้าสองก็ยังไม่แสดงข้อมูลอยู่
|
 |
 |
 |
 |
Date :
2009-12-24 21:07:16 |
By :
hatinee |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
$id_type_select=$_GET[id_type];
มีการรับค่า แต่ไม่มีการส่งค่าเลยนี่ครับ
Code (PHP)
for($i=1; $i<=$Num_Pages; $i++){
if($i != $Page)
{
echo "[ <a href=\"".$_SERVER['SCRIPT_NAME']."?Page=$i&id_type=$id_type_select&user_id=".$_REQUEST['user_id']."&carlender1=".$_REQUEST['carlender1']."&carlender2".$_REQUEST['carlender2']." \">$i</a> ]";
} else {
echo "<b> $i </b>"; }
}
แบบนี้น่าจะได้นะครับ
|
 |
 |
 |
 |
Date :
2009-12-25 00:17:59 |
By :
lozomac |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณน่ะค่ะ ทั้ง Nueng และ A-mac ที่ให้คำแนะนำแก่นี นีทำได้แล้วขอบคุณมากค่ะ (ถ้ามีปัญหาอีก จะกลับมาขอคำแนะนำใหม่น่ะค่ะ)
|
 |
 |
 |
 |
Date :
2009-12-25 13:51:00 |
By :
hatinee |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 01
|