  | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 Code (PHP) 
<?php
  require("connect.php");
    //$select=$_GET['id'];
//$search=$_GET['id2'];
  $sql="SELECT * FROM credit,motor,customer WHERE credit.handbookid=motor.handbookid and motor.customerid=customer.customerid ";
  $db=mysql_query($sql);
  $row = mysql_num_rows($db);
//$row=$row++;
//echo $sql;exit();
$Per_Page = 10;   // 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($row<=$Per_Page)
{
	$Num_Pages =1;
}
else if(($row % $Per_Page)==0)
{
	$Num_Pages =($row/$Per_Page) ;
}
else
{
	$Num_Pages =($row/$Per_Page)+1;
	$Num_Pages = (int)$Num_Pages;
}
$sql.=" order by creditid ASC LIMIT $Page_Start , $Per_Page";
//echo $sql;exit();
 $db=mysql_query($sql);
while ($result=mysql_fetch_array($db))
{
   $handbookid =$result["handbookid"];
   $motorname=$result["motorname"];
   $generation=$result["generation"];
   $customerid=$result["customerid"];
   $body=$result["body"];
   $regis_no=$result["regis_no"];
   $color=$result["color"];
   $year_sell=$result["year_sell"];
   $kindname=$result["kindname"];
    $creditid =$result["creditid"];
   $approve=$result["approve"];
   $estimate=$result["estimate"];
   $expense=$result["expense"];
   $cost=$result["cost"];
   $rate=$result["rate"];
   $instalment=$result["instalment"];
   $interest=$result["interest"];
   $price=$result["price"];
   $money_pay=$result["money_pay"];
   $month_pay=$result["month_pay"];
   $total=$result["total"];
  $begin=$result["begin"];
     $customerid =$result["customerid"];
   $titlename=$result["titlename"];
    $cname=$result["cname"];
	$clast=$result["clast"];
	$statename=$result["statename"];
	$brithday=$result["brithday"];
	$address=$result["address"];
	$moo=$result["moo"];
	$district=$result["district"];
	$amphur=$result["amphur"];
	$province=$result["province"];
	$zipcode=$result["zipcode"];
	$phone=$result["phone"];
ทั้งหมด <?= $row;?> รายการ : <?=$Num_Pages;?> หน้า :
<?
if($Prev_Page)
{
	echo " <a href='$_SERVER[SCRIPT_NAME]?Page=$Prev_Page'><< ย้อนกลับ</a> ";
}
for($i=1; $i<=$Num_Pages; $i++){
	if($i != $Page)
	{
		echo "[ <a href='$_SERVER[SCRIPT_NAME]?Page=$i'>$i</a> ]";
	}
	else
	{
		echo "<b> $i </b>";
	}
}
if($Page!=$Num_Pages)
{
	echo " <a href ='$_SERVER[SCRIPT_NAME]?Page=$Next_Page'>หน้าถัดไป>></a> ";
}
?>
 
 
ลองทำดูนะ                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-07-13 07:26:30 | 
                        By :
                            kai9 | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 คุณ kai ครับ 
 
คือผมต้องการแสดงเลขหน้าครั้งละ 10 นะครับ 
ไม่ใช่แสดงผลครั้งละ 10 ข้อมูล                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-07-13 08:01:47 | 
                        By :
                            petzaza009 | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 ผมก็อยากรู้เรื่องนี้เหมือนกันครับ                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-07-13 10:12:13 | 
                        By :
                            tarorio | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 โทษที Mr.P เดี๋ยวหามาตอบใหม่ ไปศึกษาก่อนนะ                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-07-13 10:19:14 | 
                        By :
                            kai9 | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 Code (PHP) 
<?php
  <div class="clear"></div>
                    
 <div id="gpaging"  >
     
<div>
 
   <div id="gpaging-num">
   
   
   <div id="pag1_cn"> <a href='pgame_news_list.aspx?itype=all&se=&page=1&_type=L&_utype=1&user=&tag=' class="txtContent11"><a href="#" class="gpaging-select">1</a>  <a href='pgame_news_list.aspx?itype=all&se=&page=2&_type=L&_utype=1&user=&tag=' class="gpaging">2</a>  <a href='pgame_news_list.aspx?itype=all&se=&page=3&_type=L&_utype=1&user=&tag=' class="gpaging">3</a>  <a href='pgame_news_list.aspx?itype=all&se=&page=4&_type=L&_utype=1&user=&tag=' class="gpaging">4</a>  <a href='pgame_news_list.aspx?itype=all&se=&page=5&_type=L&_utype=1&user=&tag=' class="gpaging">5</a>  <a href='pgame_news_list.aspx?itype=all&se=&page=6&_type=L&_utype=1&user=&tag=' class="gpaging">6</a>  <a href='pgame_news_list.aspx?itype=all&se=&page=7&_type=L&_utype=1&user=&tag=' class="gpaging">7</a>  <a href='pgame_news_list.aspx?itype=all&se=&page=8&_type=L&_utype=1&user=&tag=' class="gpaging">8</a>  <a href='pgame_news_list.aspx?itype=all&se=&page=9&_type=L&_utype=1&user=&tag=' class="gpaging">9</a>  <a href='pgame_news_list.aspx?itype=all&se=&page=10&_type=L&_utype=1&user=&tag=' class="gpaging">10</a> <a href='pgame_news_list.aspx?itype=all&se=&page=11&_type=L&_utype=1&user=&tag=' class="txtContent11"><img src="/images/icon/icon_next.gif" width="12" height="11" alt="หน้าต่อไป" border="0" /></a> <a href='pgame_news_list.aspx?itype=all&se=&page=491&_type=L&_utype=1&user=&tag=' class="txtContent11"><img src="/images/icon/icon_next2.gif" width="15" height="11" alt="หน้าสุดท้าย" border="0" /></a></div>
    </div>
    <div>
     ขณะนี้ คุณอยู่หน้าที่ 
    <input name="pag1$txtpaging" type="text" id="pag1_txtpaging" readonly="" style="width: 24px; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid;" value="1" />
    </div>
    
  </div>
    <input name="pag1$hdntype" type="hidden" id="pag1_hdntype" style="width: 13px" value="L" />
    <input name="pag1$search" type="hidden" id="pag1_search" style="width: 13px" />
            
      </div>
?>
                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-07-13 10:42:25 | 
                        By :
                            kai9 | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 เว็บที่คุณแนะนำ เขาเขียนตามข้างบน มีข้อผิดพลาดขออภยด้วยนะค่ะ Mr.P                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-07-13 10:43:28 | 
                        By :
                            kai9 | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 หาดูในบอร์ดครับ ผมเคยแปะโค๊ดไว้                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-07-13 14:15:22 | 
                        By :
                            plakrim | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	     
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 for($i=($Page+1); $i<=($c+10) ; $i++)  
 
บรรทัด 42 น่าจะแก้ได้ครับ                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-07-14 02:18:34 | 
                        By :
                            lozomac | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 มีแบบใช้ zendframework บ่ครับ?                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-07-14 02:28:10 | 
                        By :
                            mr.v | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 คุณ a-mac ผมแก้ได้แล้วครับ 
 
แก้ตรงบรรทัดที่ 
24 นะครับ 
 
เป็น 
Code (PHP) 
<?php
		$c = ( 1 + ( $b * 10 ) );
		$d = ( $b * 10 ) ;
		if ( $Page == $d ) {
			$b = ( $b - 1 ) ;
			$c=(1+($b*10));
		}
?>
 
 
 
กับ บรรทัดที่ 27 
เป็น 
Code (PHP) 
<?php
if ( $Page > 10 )
?>
                         
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-07-15 00:59:54 | 
                        By :
                            petzaza009 | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 นำไปใช้อย่างไงหรือครับผมงงครับ                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-09-03 11:58:24 | 
                        By :
                            black2526 | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	     
	    
     
               
		
     
		
	     
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 555   ผมวางมุขไว้สำหรับการนี้โดยเฉพาะ                          
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-09-03 12:41:49 | 
                        By :
                            panyapol | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 สั้นจริงเหรอ ??? ไม่บอกไม่รู้หน่ะเนี่ย                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-09-03 12:47:38 | 
                        By :
                            chaiwit | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                   
 
มาดูตอนไหนฟะ                          
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-09-03 14:00:54 | 
                        By :
                            plakrim | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                   
 
เรทกานเองนะพวกเก้งกวางเนี่ยะ 555+                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-09-03 14:15:25 | 
                        By :
                            gummezaka | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 อ่ะล้อเล่นนน   
หง่าา โคดแบ่งหน้า สั้น ไม่ใช่ .....อันนั้นสั้น                          
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-09-03 14:26:05 | 
                        By :
                            panyapol | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                   มีคนร้อนตัววววววววว                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-09-03 16:20:59 | 
                        By :
                            gummezaka | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                   เจ๊มี่ที่บริษัทรับพนักงานเพิ่มเปล่า 5555                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-09-03 16:28:17 | 
                        By :
                            somparn | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 รับอยู่ค่ะ ว่าแต่รู้มาจากไหนค่ะ                         
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-09-03 19:30:41 | 
                        By :
                            gummezaka | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 รับจริงหรือนี้ ผมถามดูเฉยๆครับอยากเปลี่ยนที่ทำงานล่ะเบื่อเจ้าของบริษัท สวัสดิการไม่มีสักอย่าง ค่าล่วงเวลาก็ไม่มี 
มีแต่เงินเดือนล้วนๆ สัญญาตั้งปีหนึ่ง แต่มันหางานอยากต้องทน หุหุหุก็เลยถามเจ๊ดูอ่ะครับผมยังไม่รู้เลยว่าบริษัทเจ๊อยู่ไหน55                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-09-03 19:44:43 | 
                        By :
                            somparn | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 แบบนี้เค้าเรียกสมัครงานผ่านเว็บของจริง ไม่ใช้สลิง ไม่ใช้ตัวแสดงแทน                          
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-09-03 20:01:32 | 
                        By :
                            plakrim | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	     
	    
     
      		  
	
     |