Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Storing non-integer numbers

Quote Reply
Storing non-integer numbers
There seems to be no non-integer number field type available when adding new columns to a table - yet the ratings field is assigned type "FLOAT".

How do I store - for example - a price in 999.99 format as a number to allow subsequent math operations to be performed upon it?
Quote Reply
Re: [CrazyGuy] Storing non-integer numbers In reply to
Your best bet is to manually modify the field type in MySQLMan. I've already requested this feature, as I needed it really when working on my Ace_PPC plugin.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Storing non-integer numbers In reply to
Thanks Andy - for at least confirming I hadn't missed something Wink

Certainly seems like an obvious omission ... but come to think of it maybe that's only true if you're trying to use Links SQL for one of the million non-links applications it may lend itself to Smile
Quote Reply
Re: [CrazyGuy] Storing non-integer numbers In reply to
BTW... when setting up via a plugin, you can define the field as a FLOAT, its just via the admin that you can't :(

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Storing non-integer numbers In reply to
Can a custom column in links table be set to type FLOAT or type DOUBLE?

I have been working on this for hours, and cannot get add/modify forms to accept FLOAT or DOUBLE values.

What core code do I have to modify in order for FLOAT and DOUBLE values to not return an error?

I have searched for a solution, and posted several questions, but they all come back to the fact that
the submit code is rejecting any decimal value as not acceptable.

How can I take a decimal input on an add/modify form?

Thanks again
Chris
RGB World, Inc. - Software & Web Development.
rgbworld.com
Quote Reply
Re: [rgbworld] Storing non-integer numbers In reply to
Hi,

I normally just set it in MySQL directly (or MySQLMan), when using a FLOAT. Would be a lot easier if it was just an option (hint-hint GT <G>).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Storing non-integer numbers In reply to
I HAVE set the datatype to DOUBLE and FLOAT.

When entering a decimal value via add/modify,
Niether one is accepted. They are rejected as invalid data

Chris
RGB World, Inc. - Software &amp; Web Development.
rgbworld.com
Quote Reply
Re: [rgbworld] Storing non-integer numbers In reply to
Mmm.. just a wild guess... is there a regex in place?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Storing non-integer numbers In reply to
No
RGB World, Inc. - Software &amp; Web Development.
rgbworld.com