Welcome Guest, Not a member yet? Register   Sign In
Is this bad sql to count total for pagination? (CI3-dev)
#3

[eluser]joergy[/eluser]
ever thought about
select count(id) from...
or similar, if You expect many records?

IMHO this
$this->db->query(preg_replace('/LIMIT.+$/i','', $sql))->num_rows();
isn't easy to read. Why not splitting...


Messages In This Thread
Is this bad sql to count total for pagination? (CI3-dev) - by El Forum - 06-22-2014, 02:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB