Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
DB::Query results values is all string type
kchan4
February 2016
As titled, I have MySQL Table defines columns as float, double, int etc, but they all returned with double quote as string type.
I remember ORM have Observer_Typing to do the typing automatically.
Is there anyway to do the typing automatically for DB::Query as well?
Harro
February 2016
Accepted Answer
The PHP MySQL driver returns all values as string, so that is outside the framework's control.
There is no typing option for low-level DB queries, you'll have to handle that in your model.
kchan4
February 2016
I see, thanks Harro!
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,088
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
260
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
February 2016
kchan4
February 2016