[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: [Damon] [DATATYPES] Textfield vs Float

By richb - February 8, 2011

Just trying to determine if I can change the datatype of the "pricing" field from TEXT to FLOAT or INTEGER. Will CMS tools work without any issues?

FYI. I plan on using external SQL Admin tool to modify the table structure.

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/