在Codeigniter中result_array不会返回超过2800条记录?但我有3500条记录,但我把限制0到2750,查询将执行否则数组不返回值。如何返回值?
$wsql = "SELECT ID, prod_id, product_family, country_name, factory_details, substrate, thickness, width_size, length_size, appearence, coating_type, laminated_against_PVB, bending, enamaling_and_or_screen_printed, contact_name, contact_email, contact_phone, contact_address, created_on, updated_on, ip_address, status FROM product_finder_master WHERE updated_on > ?";
$res["sggrpf"] = $this->db->query($wsql,array($arr['last_updated_date']));
return $res;
答案 0 :(得分:1)
你需要为此做分页。看来你使用的mysql有局限性。我收到了同样的错误,但一次插入超过10k的记录。
$cnt=0;
$user=0
do
{
$user=0;
$sql = "SELECT column FROM table LIMIT 999 offset ".$cnt;
$result = mysql_query($sql);
$devices = array();
while($row = mysql_fetch_assoc($result))
{
$devices[] = $row['push_id'];
}
$message = array("title" => $title, "images" => $images, "description" => $description);
$resultOfGCM = send_notification($devices, $message);
$user=mysql_num_rows($result);
$cnt=$cnt+$user;
}while($user>=999);
请找到以上解决方案
由于 NISHANT