Reputation: 23560
Using Codeigniter, any numeric data returned from my MySQL database is returned as strings. How can I configure the database/PHP/Codeigniter to return numbers as numbers?
Upvotes: 0
Views: 105
Reputation: 26477
This isn't just Codeigniter behaviour, it's the behaviour of PHP generally.
If you look at any of the result functions such as mysql_result()
or mysql_fetch_array()
to name a couple, they return string or an array of strings respectively.
The Codeigniter MySQL drivers use these functions to return their results.
Upvotes: 4