作者:胖妞-Debbie_982 | 来源:互联网 | 2018-07-17 06:02
ec(2);$sql"select*frommy_notewherenote_url4"; $resultmysql_query($sql)ordie(Error.mysql_error()); $allrecordmysql_num_rows($result); $pageisset($_GET[
$sql="select * from my_note where note_url='4'";
$result=mysql_query($sql) or die('Error'.mysql_error());
$allrecord=mysql_num_rows($result);
$page=isset($_GET['page'])?$_GET['page']:1;
$pagesize=10;
$pagecount=($allrecord % $pagesize)?(int)($allrecord / $pagesize) +1:$allrecord / $pagesize;
$page=($page>$pagecount || $page<1)?$page=1:$page;
$start=$pagesize*($page-1);
$sqllist="select * from my_note where note_url='4' order by id desc limit $start,$pagesize ";
$resulte=mysql_query($sqllist) or die('Error '.mysql_error());
$num=mysql_num_rows($resulte);
if($num){
while($rs=mysql_fetch_object($resulte)){
if($rs->note_url=='1'){
echo("
".$rs->note_title." [".$rs->note_date."] n");
}else{
echo("
".$rs->note_title." [".$rs->note_date."]n");
}
}
echo("
共".$pagecount."页 每页".$pagesize."条记录 共".$allrecord."个作品
");
for($i=$pagecount;$i>=1;$i--){
echo("
".($i)."
");
}
echo("");
}else{
echo('No Infomation');
}
}