php入门mysql分页调用程序
下面图老师小编要向大家介绍下php入门mysql分页调用程序,看起来复杂实则是简单的,掌握好技巧就OK,喜欢就赶紧收藏起来吧!
include("inc/PageQuery.inc");
$pq = new PageQuery(2); // 获取Connection
$pq-myQuery("select * from users"); // 执行查询
while($row = mysql_fetch_array($pq-result) ) {
echo $row["id"] . ", ";
echo $row["Username"] . ", ";
echo $row["Password"];
echo "br";
}
echo $pq-PageLegend(); // 翻页栏
?