Re: MySQL and Numbers
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 62817
interpreted = N
texte = I also have a field named "price" in a table. The field is spec'ed as FLOAT=,and a price of $20.00 would show in the table as just 20. When I pull theprice from the table, it displays some weird number like 1074987008. I trie=dthe format code below, but it doesn't show anything when I insert [myprice]into the [founditems] loop.Any ideas?On 8/8/05 7:42 AM, "nitai@computeroil.com"
wrote:> Strange I have had not much problems with numbers in the past. But may tr=y> this to give a alias to the number:>=20> Select ean, format(price,2) as myprice> Where xxxxx>=20> Then get it within WebDNA as [myprice].>=20> You could also retrieve the "raw" value from the SQL DB and then do the> formatting from there.>=20> Nitai>=20> --> Redakto CMS - Content Management that simply works> Redakto eServices - Professional WebHelpDesk> Redakto ImagePark - Innovative Asset Management>=20> ComputerOil=AE AG> Neugutstrasse 66> 8600 D=FCbendorf / Switzerland> Telefon +41 (0)844 44 55 66>=20> info@computeroil.com> http://computeroil.com>> -----Original Message----->> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf Of>> Thierry Almy>> Sent: Montag, 8. August 2005 13:50>> To: WebDNA Talk>> Subject: MySQL and Numbers>>=20>> I know this has been covered before but I didn't get the glue ...>>=20>> WebDNA has problems in showing up the correct value from a MySQL>> Database if the field is a number field (FLOOD, DECIMAL, INT, ...)>>=20>> In my case it's a field holding the price for an item.>>=20>> My query lokks like this:>> SELECT ean,price FROM table01 WHERE id=3D1;>>=20>> so I tried as described earlier in the list:>>=20>> SELECT ean,FORMAT(price,2) FROM table01 WHERE id=3D1;>> or>> SELECT ean,FORMAT(price,2) AS PERCENT FROM table01 WHERE id=3D1;>>=20>> in both cases WebDNA will not know the field "price" and is>> displaying it within the brackets: [price]>>=20>>=20>> How do you do that?-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
I also have a field named "price" in a table. The field is spec'ed as FLOAT=,and a price of $20.00 would show in the table as just 20. When I pull theprice from the table, it displays some weird number like 1074987008. I trie=dthe format code below, but it doesn't show anything when I insert [myprice]into the [founditems] loop.Any ideas?On 8/8/05 7:42 AM, "nitai@computeroil.com" wrote:> Strange I have had not much problems with numbers in the past. But may tr=y> this to give a alias to the number:>=20> Select ean, format(price,2) as myprice> Where xxxxx>=20> Then get it within WebDNA as [myprice].>=20> You could also retrieve the "raw" value from the SQL DB and then do the> formatting from there.>=20> Nitai>=20> --> Redakto CMS - Content Management that simply works> Redakto eServices - Professional WebHelpDesk> Redakto ImagePark - Innovative Asset Management>=20> ComputerOil=AE AG> Neugutstrasse 66> 8600 D=FCbendorf / Switzerland> Telefon +41 (0)844 44 55 66>=20> info@computeroil.com> http://computeroil.com>> -----Original Message----->> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf Of>> Thierry Almy>> Sent: Montag, 8. August 2005 13:50>> To: WebDNA Talk>> Subject: MySQL and Numbers>>=20>> I know this has been covered before but I didn't get the glue ...>>=20>> WebDNA has problems in showing up the correct value from a MySQL>> Database if the field is a number field (FLOOD, DECIMAL, INT, ...)>>=20>> In my case it's a field holding the price for an item.>>=20>> My query lokks like this:>> SELECT ean,price FROM table01 WHERE id=3D1;>>=20>> so I tried as described earlier in the list:>>=20>> SELECT ean,FORMAT(price,2) FROM table01 WHERE id=3D1;>> or>> SELECT ean,FORMAT(price,2) AS PERCENT FROM table01 WHERE id=3D1;>>=20>> in both cases WebDNA will not know the field "price" and is>> displaying it within the brackets: [price]>>=20>>=20>> How do you do that?-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Clint Davis
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:
IIS4 (1998)
Automated FTP from Shell (2004)
Shipcost lookup? (1997)
UK DNA host wanted (2005)
On a related topic (2006)
searching with if/then (2004)
mail sent from webcatalog. accented chars! (1998)
Authenticate (1997)
[WebDNA] paypal FINALLY!!!! (2009)
RE: Multiple Stores and WebCatalog Prefs (1997)
Register First (2000)
setlineiems and UnitShip Cost (2000)
[include] error message (was:how to put/keep product customization info in basket?) (1998)
[WebDNA] WebDNA Sciprt for Zipping files? (2012)
Quitting WebMerchant ? (1997)
To Use Cookies or Not To Use Cookies (2003)
WC2b15 File Corruption (1997)
.eml files (2001)
raw=T is broken in [include] (1997)
How do you hide [math]stuff[/math] (1997)