mysql-php page code problem, can only display the first page, page to prompt warning, seek guidance

Source: Internet
Author: User
Keywords Paging MySQL PHP
Paging mysqlphp

$conn =mysql_connect (' localhost ', ' root ', ' admin ') or die (' could not connect: '. Mysql_error ());
mysql_select_db (' sybgtjxt ') or die (' could not select database ');
mysql_query ("Set names GBK");
if (Mysqli_connect_errno ()) {
echo "Database connection failed";
}
else{
$pagesize = 5;
if ($_get[' page ']!= ')
$page =$_get[' page ';
else {
$page = 1;
}
$sql 1= "SELECT * from Tblreport where is_modify=0 order by Sid Desc";

    $rs=mysql_query($sql1);    $numRecord=mysql_num_rows($rs);    //echo"$numRecord";    //echo "$page";    $totalpage=ceil($numRecord/$pagesize);      //echo"$totalpage";    $recordSql=$sql1." limit ".(($page-1)*$pagesize).",".$pagesize;    $result=mysql_query($recordSql);    //if($result)    //echo"成功";    //  else     //echo "失败";    //$rst=mysql_fetch_array($rs);    //echo $rst['pname'];    }?>




Correcting homework





   
   
Job Scoring >> Grading jobs
Student Name:
student number report name classroom teacher student name action
Correcting




}
?>





0) Echo $page-1;? > ' > Prev


  
          



  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.