Welcome Guest, Not a member yet? Register   Sign In
count_all_results returns a string?
#5

[eluser]daveWid[/eluser]
For a quick change to an integer you can just cast it. There are a few different ways.

Code:
$results = (integer)$this->db->count_all_results('my_table');
$results = (int)$this->db->count_all_results('my_table');
$results = intval($this->db->count_all_results('my_table'));


Messages In This Thread
count_all_results returns a string? - by El Forum - 04-03-2009, 08:51 AM
count_all_results returns a string? - by El Forum - 04-03-2009, 08:54 AM
count_all_results returns a string? - by El Forum - 04-03-2009, 09:03 AM
count_all_results returns a string? - by El Forum - 04-03-2009, 09:45 AM
count_all_results returns a string? - by El Forum - 04-03-2009, 10:49 AM
count_all_results returns a string? - by El Forum - 04-03-2009, 01:25 PM
count_all_results returns a string? - by El Forum - 04-03-2009, 01:54 PM
count_all_results returns a string? - by El Forum - 04-04-2009, 09:57 AM
count_all_results returns a string? - by El Forum - 04-05-2009, 04:09 AM
count_all_results returns a string? - by El Forum - 04-05-2009, 04:30 AM
count_all_results returns a string? - by El Forum - 04-05-2009, 04:56 AM
count_all_results returns a string? - by El Forum - 04-05-2009, 06:06 AM
count_all_results returns a string? - by El Forum - 04-08-2009, 10:50 AM
count_all_results returns a string? - by El Forum - 04-08-2009, 11:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB