关于分面问题,急用,请赶快进来!谢 上面写错了,是mysql_data_seek($result,($notepage-1*10) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 给你两种思路1. mysql_data_seek($result,($notepage-1*30))$sql="select * from table ".$query_condition; //查询条件组合部分,你自己组合$result = mysql_query($sql);for ($i = ($notepage-1*30)) - 1; $i <= notepage; $i++) { if (!mysql_data_seek($result, $i)) { echo "Cannot seek to row $i: " . mysql_error() . "\n"; continue; }if(!($row = mysql_fetch_object($result))) continue;echo "$row->last_name $row->first_name<br />\n";}mysql_free_result($result);2.利用limit来做,这样选择出来的数据最少$sql="select * from table ".$query_condition." limit ($notepage-1*30),$notepage"; $result=mysql_query($sql);while($rs=mysql_fetch_row($result)){ print_r($rs);}建议mysql的分页采用第二种方式 请问有没有很简单的留言本等等很简单的源代码,主要是学习PHP操作数据库 IFRAME 中$_GET['page']的问题 写注册表单时,想同时将注册时间写入数据库。怎么写。 redhat enterprise linux 5下如何安装GCC编译环境?? 调用类里面方法的问题 请教php5如何得到,引用本函数的上一级函数名 PHP关闭浏览器触发链接代码 请教高手,php学习中怎样进步快一些? php4在nt下如何加载oci8模块 大神,求一个实时显示问题的实行思路 分页生成静态页面后出现的问题! 如何正确获取大于2G的文件的大小?
给你两种思路
1. mysql_data_seek($result,($notepage-1*30))$sql="select * from table ".$query_condition; //查询条件组合部分,你自己组合$result = mysql_query($sql);for ($i = ($notepage-1*30)) - 1; $i <= notepage; $i++) {
if (!mysql_data_seek($result, $i)) {
echo "Cannot seek to row $i: " . mysql_error() . "\n";
continue;
}
if(!($row = mysql_fetch_object($result)))
continue;echo "$row->last_name $row->first_name<br />\n";}
mysql_free_result($result);
2.利用limit来做,这样选择出来的数据最少
$sql="select * from table ".$query_condition." limit ($notepage-1*30),$notepage";
$result=mysql_query($sql);
while($rs=mysql_fetch_row($result))
{
print_r($rs);
}建议mysql的分页采用第二种方式