Hi,
Assume it just another brain block - I need to insert/ update/ upsert data into a MySQL database, and having a field there that is formatted [Decimal 10,4] makes me trouble.
I keep getting errors of this field, I have tried all possible ways of numberformat and format now, but it still doesn't want to work.
So, assuming I have 10.5 (ten and a half) as value, how would I write it in my "VALUES" section of the SQL String to get it through?
I'm sure one one the wizards here will laugh now loudly, and solve my problem with a 1-liner - Thx a lot for it, my brain seems blocked for now!
Thx, and have fun!
INSERT INTO MySQL (Decimal 10,4) - ???
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
INSERT INTO MySQL (Decimal 10,4) - ???
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
Re: INSERT INTO MySQL (Decimal 10,4) - ???
Hi,
I have a feeling that the problem isn't related to the number of the SQL field. What is the complete text of the error messages you get?
Mark
I have a feeling that the problem isn't related to the number of the SQL field. What is the complete text of the error messages you get?
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: INSERT INTO MySQL (Decimal 10,4) - ???
Mark,
I have to excuse. After I posted my question I went on to other problems, and got overwhelmed by those.
Now, that those other problems slowly start to rot on the battlefield of code (= I solved them), I found time to come back here.
To be honest, no idea anymore what error is thrown when I try to insert. I'll add this information asap.
Just to clarify, the MySQL has a field defined as [Decimal 10,4]. My idea was to feed it with '10.5000' thus in the VALUES section of the SQL string-to-built (for 10 and a half). As far as I remember this (and any other tries) failed in any possible variety, so my question.
I had hoped that someone else would recognize the problem ("Yeah, inserting decimals into MySQL, what a madness!") and would show me the proper syntax to write my 10 & a half within the VALUES section of an INSERT SQL string properly ...
Now it's the time to start working with this again, so I'll provide the proper error messages.
Thx a lot for your help!
Have fun!
I have to excuse. After I posted my question I went on to other problems, and got overwhelmed by those.
Now, that those other problems slowly start to rot on the battlefield of code (= I solved them), I found time to come back here.
To be honest, no idea anymore what error is thrown when I try to insert. I'll add this information asap.
Just to clarify, the MySQL has a field defined as [Decimal 10,4]. My idea was to feed it with '10.5000' thus in the VALUES section of the SQL string-to-built (for 10 and a half). As far as I remember this (and any other tries) failed in any possible variety, so my question.
I had hoped that someone else would recognize the problem ("Yeah, inserting decimals into MySQL, what a madness!") and would show me the proper syntax to write my 10 & a half within the VALUES section of an INSERT SQL string properly ...
Now it's the time to start working with this again, so I'll provide the proper error messages.
Thx a lot for your help!
Have fun!
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!