Welcome Guest, Not a member yet? Register   Sign In
MySQL can't get all records
#1

[eluser]kptengco[/eluser]
i have 50,000 records on my table and i use this
Code:
$this->db->get('table_name');

and when i print it,
Code:
<pre>
&lt;?php echo print_r($this->db->get('table_name')); ?&gt;
</pre>
it returns 29,455 max record only. what i need is to get all the rows (50,000 records).


i also tried this one
Code:
$this->db->get('tblname',50000,0);
and this
Code:
$this->db->limit(50000)->get('tblname');
but same result :down:

please help me guys how to fix this :-S
#2

[eluser]Samus[/eluser]
Use pagination dude.

Loading 50k records is just way too ineffecient imo. It'lltake 10 - 20 seconds to render the full page and that isn't taking into account any other assets you may have there.

http://ellislab.com/codeigniter/user-gui...ation.html
#3

[eluser]kptengco[/eluser]
:-S i just want to make a data migration tool that can load/insert a 50k up record. anyways thnx for the feedback dude :lol:
#4

[eluser]pbflash[/eluser]
Did you try doing a count on the query result? There is a chance that all the records are there but are not displayed due to some limitation.
#5

[eluser]kptengco[/eluser]
the
Code:
num_rows()
? yep its still in a limit of 29,455 number of records i also did mysql_num_rows()

but if i use
Code:
mysql_query()
it get all the records.
#6

[eluser]Aken[/eluser]
What happens if you forego active record and use $this->db->query() ?
#7

[eluser]kptengco[/eluser]
oh i didn't try that yet..
Code:
$this->db->query

Is it differ with this one
Code:
$this->db->query('SELECT * FROM tbl'); to $this->db->get('tbl');
#8

[eluser]Aken[/eluser]
I would normally assume not, but it's worth a check.

It's possible that it's a PHP limitation and not a MySQL.




Theme © iAndrew 2016 - Forum software by © MyBB