php 分批获取数据
//分批获取数据
$count = count($data["user_ids"]);//50000
$forNumber = $count / 5000 + 1;//11
$index = 0;
for($i=0;$i < $forNumber;$i++) {
$arr = array();
for($j = $index; $j < $index+5000;$j++) {
$arr["user_ids"][] = $data["user_ids"][$j];
}
$res = $user->uploadVipUser($arr);
$index += 5000;
}
//0---5000;
$count = count($data["user_ids"]);//50000
$forNumber = $count / 5000 + 1;//11
$index = 0;
for($i=0;$i < $forNumber;$i++) {
$arr = array();
for($j = $index; $j < $index+5000;$j++) {
$arr["user_ids"][] = $data["user_ids"][$j];
}
$res = $user->uploadVipUser($arr);
$index += 5000;
}
//0---5000;
//5000---10000;
php -r "echo 0x01 | 0x02 ;" 3 //或运算是相加操作 添加是或运算,显示是逻辑与运算
php -r "echo 0x01 & 0x02 ;" 0 //逻辑与是比较,相同才是1,否则是0
php -r "echo 0x01 ^ 0x02 ;"3//回位操作
声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。
- 上一篇: MySQL DECIMAL数据类型
- 下一篇: Linux进程间的通信方式和原理