Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Column can not contain the value '-87.878781'

Quote Reply
Column can not contain the value '-87.878781'
Can a column of type "double" be filled in via add/modify form?
Can it hold the value -87.878781?

I thought this was a problem with a plugin that I am writing, but...
I am unable to put the value -87.878781 in to a custom column via add/modify.html with my plugin uninstalled,
so this is a more basic problem

I have added a column of type 'double' using phpMyAdmin because "double" is not a column type choice via the admin links->properties.
When viewing links->properties, it shows as type INT. In phpMyAdmin, it is type 'double'

Please help, this is holding me up quite a bit.

My custom column via admin
33 Longitude INT No Longitude HIDDEN

Via phpMyAdmin
Longitude double No 0

Thanks
Chris
RGB World, Inc. - Software & Web Development.
rgbworld.com
Quote Reply
Re: [rgbworld] Column can not contain the value '-87.878781' In reply to
FLOAT should do negatives, doesn't it?

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] Column can not contain the value '-87.878781' In reply to
Yes, FLOAT will do negative decimals, but GLinks won't accept them via add/modify forms.

What core code needs to be edited to allow the data through?

Chris
RGB World, Inc. - Software & Web Development.
rgbworld.com
Quote Reply
Re: [rgbworld] Column can not contain the value '-87.878781' In reply to
Hi,

Afraid I'm not sure. I'm pretty sure I've managed to get floats working before (with my PPC plugin) ... as they were use for link bids. Have you tried setting it to a CHAR/TEXT, and then FLOAT in MySQL? Might be enough to just trick LSQL into thinking its a text field, but MySQKL knows otherwise.

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] Column can not contain the value '-87.878781' In reply to
Setting type to a CHAR got me through the modify form.

I should be able to work through the rest.

Thanks!

Chris

RGB World, Inc. - Software & Web Development.
rgbworld.com
Quote Reply
Re: [rgbworld] Column can not contain the value '-87.878781' In reply to
Hi,

Glad it worked Cool

I knew it had to be possible. I'd then just restrict what can go through LSQL, with a regex of;

^\d+$

..or similar (may need to use somethinglike ^[0-9\-]$ for it to accept negatives though).

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] Column can not contain the value '-87.878781' In reply to
Thanks Andy!

No need for reg exp as the data is coming from a database and not input by user.

Chris
RGB World, Inc. - Software & Web Development.
rgbworld.com