CodeIgniter Forums
variable type and $this->db->count_all_results(); - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: variable type and $this->db->count_all_results(); (/showthread.php?tid=10100)

variable type and $this->db->count_all_results(); - El Forum - 07-18-2008

[eluser]Eric Cope[/eluser]
Maybe its just my C background, but shouldn't the function
return an integer, not a string? I currently typecast it, but this seems like something that should be done within the db class. Was there a reason for it to return a string?

variable type and $this->db->count_all_results(); - El Forum - 07-20-2008

I use this feature, mostly, to display the results of a search but if I use it in a checking how many results and I need it as a Integer I use the php function intval();

Does this help?