标签:lsp china type table 分页 button 字符串 order att
<?php include("DBDA.class.php"); $db = new DBDA(); include("page.class.php"); $sz = "select count(*) from chinastates"; $zts = $db->StrQuery($sz); //造分页类对象 $page = new Page($zts,20); /* $sql = "select password from login where username=‘zhangsan‘"; echo $db->StrQuery($sql); //$sql = "update info set name=‘杨宁波‘ where code=‘p001‘"; //var_dump($db->Query($sql,0)); //一个字符串里面包含所有查到的数据 //n001^汉族|n002^回族|n003^维吾尔族| //共10页 当前第5页 5/10 首页 上一页 1 2 3 4 5 6 7 8 9 10 下一页 尾页 跳转到 【】 页 0 -- <div>共10页</div> 1 -- <div>当前第5页</div> 2 -- <input type=‘button‘ value=‘上一页‘ /> 3 -- <span>1</span><span>1</span><span>1</span> 4 -- <input type=‘button‘ value=‘下一页‘ /> 5 -- 跳转<input type=‘text‘ /> 页 $html = array(); fpage(4,2); include("page.class.php"); $page = new Page(数据总条数,每页显示几条); */ $sql = "select * from chinastates ".$page->limit; $attr = $db->Query($sql); echo "<table width=‘100%‘ border=‘1‘ cellpadding=‘0‘ cellspacing=‘0‘>"; foreach($attr as $v) { echo "<tr><td>{$v[0]}</td><td>{$v[1]}</td><td>{$v[2]}</td></tr>"; } echo "</table>"; echo $page->fpage(4,5,6); ?>
标签:lsp china type table 分页 button 字符串 order att
原文地址:http://www.cnblogs.com/liuran123/p/6028691.html