日期:2014-05-16 浏览次数:20590 次
$q="select * from member'";
$r=$obj_db->simplequery($q);
while($a=$obj_db->fetchrow($r,DB_FETCHMODE_ASSOC)){
$id=$a[id];
$mccd=$a[cca]+$a[ccb];
$query="insert into mingxi (mid,mccd,mtime) values ('$id','$mccd','$time')";
$obj_db->simplequery($query);
}
$q="select * from member'";
$r=$obj_db->simplequery($q);
while($a=$obj_db->fetchrow($r,DB_FETCHMODE_ASSOC)){
$i++;
$ep=1000;//这里假设处理完第1个1000条后再处理第二个1000条,直至处理结束?
$id=$a[id];
$mccd=$a[cca]+$a[ccb];
$query="insert into mingxi (mid,mccd,mtime) values ('$id','$mccd','$time')";
$obj_db->simplequery($query);
}
$offs = isset($_GET['offs']) ? $_GET['offs'] : 1;
$sql = "select * from member limit $offs, 1000";
//做你该做的事
header("Location: $_SERVER[PHP_SELF]?offs=" . ($offs+1000));