[WebDNA] MySQL float problems with WebDNA
This WebDNA talk-list message is from 2010
It keeps the original formatting.
numero = 104584
interpreted = N
texte = Anyone experienced strange things happening with the float data type and webdna?I have this code[SQLConnect dbType = MySQL &host = localhost &database=mysqldb&uid=myusername&pwd=mypassword&conn_var=conn1][/ SQLConnect][SQLExecute conn_ref=conn1&result_var=mancodeAverage]SELECT * from UR_mantotals WHERE mancode='[mancode]';[/SQLExecute][SQLResult result_ref=mancodeAverage][founditems][perf][/founditems][/ SQLResult]The table UR_mantotals has 10 fields, one is a char(2) field, 8 are float, and 1 is int(8)Now, in the example above, perf is a float data type and although my MySQL GUI app tells me that the real stored value is 3.65934, webDNA is displaying 1074655967Using the same code, it will display all other fields properly ie:ACTUAL DATA FROM MYSQL======================FI3.659343.743593.871793.333333.358973.717954.153853.435939DATA DISPLAYED BY WEBDNA========================FI 1074611796107465596710746559671074655967 10746559671074655967 10746559671074655967 10746559671074655967107465596739As you can see, the int and char fields are fine, but the float types have gone loopy. Has anyone experienced similar? Is this a bug?The float data type is required for this project, so I can't see a workaround for this.Any guidance appreciated. Using WebDNA version 6.0a on a Mac ServerTC
Associated Messages, from the most recent to the oldest:
Anyone experienced strange things happening with the float data type and webdna?I have this code[SQLConnect dbType = MySQL &host = localhost &database=mysqldb&uid=myusername&pwd=mypassword&conn_var=conn1][/ SQLConnect][SQLExecute conn_ref=conn1&result_var=mancodeAverage]SELECT * from UR_mantotals WHERE mancode='[mancode]';[/SQLExecute][SQLResult result_ref=mancodeAverage]
[founditems][perf][/founditems][/ SQLResult]The table UR_mantotals has 10 fields, one is a char(2) field, 8 are float, and 1 is int(8)Now, in the example above, perf is a float data type and although my MySQL GUI app tells me that the real stored value is 3.65934, webDNA is displaying 1074655967Using the same code, it will display all other fields properly ie:ACTUAL DATA FROM MYSQL======================FI3.659343.743593.871793.333333.358973.717954.153853.435939DATA DISPLAYED BY WEBDNA========================FI 1074611796107465596710746559671074655967 10746559671074655967 10746559671074655967 10746559671074655967107465596739As you can see, the int and char fields are fine, but the float types have gone loopy. Has anyone experienced similar? Is this a bug?The float data type is required for this project, so I can't see a workaround for this.Any guidance appreciated. Using WebDNA version 6.0a on a Mac ServerTC
Toby Cox
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
[Webcat 2]Next (1997)
Graphing Modules (2004)
Almost a there but..bye bye NetCloak (1997)
convertwords BUG (2002)
Here's how to kill a Butler Database. (1997)
can WC render sites out? (1997)
Redirect frame targets (1998)
WebCat2: Items xx to xx shown, etc. (1997)
[WebDNA] Sendmail BCC bug still exists (2017)
Summing fields (1997)
lookup and two records? (1997)
[WriteFile] problems (1997)
Adding up line items. (2000)
[WebDNA] Best Linux distro for a dedicated webdna server? (2011)
email database file (2005)
setting cookies for another domain? (2002)
Sort Order on a page search (1997)
WebCat2 - Getting to the browser's username/password data (1997)
Plugin or CGI or both (1997)
RE: Nesting [ListFiles] (1998)