[eluser]fritzthecat[/eluser]
Hi, thanks for the comprehensive reply.
Yes I accept that mySql returns strings in a few places where you don't expect it to, but I still think CI should make its own decision on the matter. Otherwise if you change db driver to, say, MS-SQL and that returns and integer, your code may break. I'd prefer if CI was consistent across drivers, and if some behave oddly then correct them.
As a thought experiment, imagine the scenario where you cache a query and then use a custom extension similar to count_all_results on the cached version - presumably you'd do that by counting the cached rows in an array. Would you then cast that count to a string, to replicate mySql's illogical behaviuour? It'd be strange.
As for coders' expectations, when coding directly in mySql I am fully aware count returns and a string, but when using count_all_results I was in 'CI' mode, and my first instinct was to expect it to return an integer. They are two different contexts, I don't think there'd be any confusion if they behaved differently.
Anyway, that's just my two cents, and it's not that important after all.