[DATATYPES] Textfield vs Float

4 posts by 3 authors in: Forums > CMS Builder
Last Post: February 9, 2011   (RSS)

By richb - February 7, 2011

CMS Builder field types does not have selection for "integer" or "float". I'm storing "pricing" information and must execute SQL CONVERT to sort or do any numerical calculations. On the sort, this is causing full table scans due to the CONVERT statement. This is a big performance hit. Is it possible to change the datatype and store numerical values versus text values?

Re: [richb] [DATATYPES] Textfield vs Float

By Damon - February 8, 2011

Hi,

You should be able to sort and preform calculations on pricing information entered into CMS Builder the way it is right now without any changes. I do this for projects all the time.

Can you give me an example of pricing information and how you want to use it?
Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [richb] [DATATYPES] Textfield vs Float

By Jason - February 9, 2011

Hi,

Like Damon said, you are able to do numerical sorts and calculations on the data without having to convert the field type. If you'd like some specific example of how to do this, please let us know what you need to accomplish and we'll be able to help you out.

That being said, you can go and manually change the field types to FLOAT or INTEGER. We don't recommend doing this, but it is an option. You may run into certain errors. For example, if there is any value already stored in that field that is not a number, when you try to save that record, you'll most likely get a MySQL error. Likewise if someone ever tries to enter a character ($ , etc) you'll probably get a MySQL error there as well.

We don't support any changes made to the database that was not made directly by CMS Builder.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/