• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Large DB recordset - returns num_rows, but no row data

#1
[eluser]bwuk[/eluser]
Hi,

I have a DB query that returns over 50000 results from the DB.

If we assume that my function and query looks like

Code:
function get_all_rec()
{

$this->db->select('*');
$this->db->from('my_table');

$qUsers = $this->db->get();

return $qUsers
}

and then in another method in the class, I have:

Code:
$qUsers = $this->get_all_rec();

I can then output:

Code:
echo 'num_rows(): '.$qUsers->num_rows().'<br />';

but when I try and get:

Code:
echo 'first row, user id: '.$qUsers->row(0)->user_id.'<br />';

codeigniter/php doesn't return anything. The whole script terminates and I don't know why.

Has anyone else had this issue with CI?


Thanks


bwuk


Messages In This Thread
Large DB recordset - returns num_rows, but no row data - by El Forum - 12-16-2008, 05:30 AM
Large DB recordset - returns num_rows, but no row data - by El Forum - 12-16-2008, 05:37 AM
Large DB recordset - returns num_rows, but no row data - by El Forum - 12-16-2008, 05:44 AM
Large DB recordset - returns num_rows, but no row data - by El Forum - 12-16-2008, 05:45 AM
Large DB recordset - returns num_rows, but no row data - by El Forum - 12-16-2008, 06:13 AM
Large DB recordset - returns num_rows, but no row data - by El Forum - 12-16-2008, 06:16 AM
Large DB recordset - returns num_rows, but no row data - by El Forum - 12-16-2008, 06:18 AM
Large DB recordset - returns num_rows, but no row data - by El Forum - 12-16-2008, 06:24 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.