Welcome Guest, Not a member yet? Register   Sign In
How to execute 2 queries with the same settings?
#10

[eluser]danmontgomery[/eluser]
http://ellislab.com/codeigniter/user-gui...ecord.html

Quote:$this->db->count_all_results();

Permits you to determine the number of rows in a particular Active Record query. Queries will accept Active Record restrictors such as where(), or_where(), like(), or_like(), etc. Example:

Code:
echo $this->db->count_all_results('my_table');
// Produces an integer, like 25

$this->db->like('title', 'match');
$this->db->from('my_table');
echo $this->db->count_all_results();
// Produces an integer, like 17


Messages In This Thread
How to execute 2 queries with the same settings? - by El Forum - 08-03-2010, 02:59 AM
How to execute 2 queries with the same settings? - by El Forum - 08-03-2010, 03:06 AM
How to execute 2 queries with the same settings? - by El Forum - 08-03-2010, 03:10 AM
How to execute 2 queries with the same settings? - by El Forum - 08-03-2010, 03:18 AM
How to execute 2 queries with the same settings? - by El Forum - 08-03-2010, 03:25 AM
How to execute 2 queries with the same settings? - by El Forum - 08-03-2010, 03:42 AM
How to execute 2 queries with the same settings? - by El Forum - 08-03-2010, 03:58 AM
How to execute 2 queries with the same settings? - by El Forum - 08-03-2010, 04:02 AM
How to execute 2 queries with the same settings? - by El Forum - 08-03-2010, 05:04 AM
How to execute 2 queries with the same settings? - by El Forum - 08-03-2010, 06:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB