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 the price from the table, it displays some weird number like 1074987008. I trie= d the 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:

    
  1. Re: SM: MySQL and Numbers (BUG) ( Clint Davis 2005)
  2. Re: SM: MySQL and Numbers (BUG) ( Jesse Proudman 2005)
  3. Re: SM: MySQL and Numbers (BUG) ( Clint Davis 2005)
  4. Re: SM: MySQL and Numbers (BUG) ( Jesse Proudman 2005)
  5. SM: MySQL and Numbers (BUG) ( Clint Davis 2005)
  6. Re: MySQL and Numbers ( Clint Davis 2005)
  7. Re: MySQL and Numbers ( Thierry Almy 2005)
  8. Re: MySQL and Numbers ( Clint Davis 2005)
  9. Re: MySQL and Numbers ( nitai@computeroil.com 2005)
  10. Re: MySQL and Numbers ( Clint Davis 2005)
  11. Re: MySQL and Numbers ( Thierry Almy 2005)
  12. Re: MySQL and Numbers ( Clint Davis 2005)
  13. Re: MySQL and Numbers ( Thierry Almy 2005)
  14. Re: MySQL and Numbers ( nitai@computeroil.com 2005)
  15. MySQL and Numbers ( Thierry Almy 2005)
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 the price from the table, it displays some weird number like 1074987008. I trie= d the 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:

multi-paragraph fields (1997) Giving out error pages (1997) European Convention...REPORT (2004) Wanted: More Math Functions (or, Can You Solve This?) (1997) Temp DB (Was freeze) (2003) line endings for Mac OS X files? (2003) TeaRoom Search page (2000) Protect (1997) Bug at start of Apache 2 with iTools 7 (2003) WebCat2 Append problem (B14Macacgi) (1997) [WebDNA] XML Syntax (2012) [date] insanity! (2001) Header info in content (1998) [WebDNA] fastcgi 7+ & [cart]? (2010) Secure server question (1997) Kaaaaahhhhhhhnnnnnnn! (1997) [addlineitems] display (1997) Date problems (1997) Best way to upload file.... (2000) syntax question, not in online refernce (1997)