On Fri, Nov 2, 2012 at 5:45 PM, Daniel Montenegro <[email protected]>wrote:
> Thanks Jeff and Barry, > > Actually I've changed the column type to VARCHAR and now mysql is working > fine. > lol. You are lucky mysql is so forgiving. > > Do you believe this is ok? > Its 'ok' in that it appears to work. But its really bad practice in general. As a varchar, indexes on the column wont work well. Because mysql is not storing a string, every time you want to use the column as a number (eg <, > or between etc) mysql will have to convert to a number. The difference will be not noticeable if you only have a few rows in your table. Put a few thousend rows and you will notice. I would recommend using a proper numeric column. Using a varchar is just brushing the issue under the carpet. It will come back and bite you later. Storing more than 6 decimal places is pointless, you are deluding yourself if you think storing more is worth it. If you really want to to store more use a float or a double column type. Either would be miles better than a varchar. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
