Welcome Guest, Not a member yet? Register   Sign In
return num_rows and query results
#4

[eluser]TheFuzzy0ne[/eluser]
No, it's not possible to do this natively with the AR class, as SQL_CALC_FOUND_ROWS is not supported by all database platforms natively.

The same thing using the Active Record class might go something like this:
Code:
$this->db->select('SQL_CALC_FOUND_ROWS *', FALSE);
$res = $this->db->get('my_table');
$res_count = $this->db->query('SELECT FOUND_ROWS()');


Messages In This Thread
return num_rows and query results - by El Forum - 05-29-2009, 11:10 AM
return num_rows and query results - by El Forum - 05-29-2009, 11:18 AM
return num_rows and query results - by El Forum - 05-29-2009, 11:30 AM
return num_rows and query results - by El Forum - 05-29-2009, 11:40 AM
return num_rows and query results - by El Forum - 05-29-2009, 11:56 AM
return num_rows and query results - by El Forum - 05-29-2009, 12:06 PM
return num_rows and query results - by El Forum - 05-29-2009, 12:09 PM
return num_rows and query results - by El Forum - 05-29-2009, 12:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB