Re: MySQL and Numbers
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 62820
interpreted = N
texte = I have a field called price setup as a float. An item costing $20.00 wouldshow in the table as simply 20. I need to format the price to 2 decimalplaces. When I run the following query, I get a weird number like1078034432:SELECT thumb,title,itemid,price FROM items where viewable='Yes' ORDER BYRAND() limit 2;When I try to format the field in the following query, I get nothing:SELECT thumb,title,itemid,price,FORMAT(price,2) FROM items whereviewable='Yes' ORDER BY RAND() limit 2;On 8/21/05 6:21 AM, "Thierry Almy"
wrote:> It worked for me, but the filed names are different:>> Select ean, format(preis,2) as myprice> > I even could to it like this:>> Select ean, format(preis,2) as preis> and then referring to the original filedname [preis]> > Maybe "price" is a reserved variablename or expression?!> > Post your SQL Query in here to verify!> Thierry> > >> 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 tried>> the format code below, but it doesn't show anything when I insert [myprice]>> into the [founditems] loop.>> >> Any ideas?>> >>> Select ean, format(price,2) as myprice>>>> Where xxxxx>>>> >>>> Then get it within WebDNA as [myprice].-------------------------------------------------------------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 have a field called price setup as a float. An item costing $20.00 wouldshow in the table as simply 20. I need to format the price to 2 decimalplaces. When I run the following query, I get a weird number like1078034432:SELECT thumb,title,itemid,price FROM items where viewable='Yes' ORDER BYRAND() limit 2;When I try to format the field in the following query, I get nothing:SELECT thumb,title,itemid,price,FORMAT(price,2) FROM items whereviewable='Yes' ORDER BY RAND() limit 2;On 8/21/05 6:21 AM, "Thierry Almy" wrote:> It worked for me, but the filed names are different:>> Select ean, format(preis,2) as myprice> > I even could to it like this:>> Select ean, format(preis,2) as preis> and then referring to the original filedname [preis]> > Maybe "price" is a reserved variablename or expression?!> > Post your SQL Query in here to verify!> Thierry> > >> 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 tried>> the format code below, but it doesn't show anything when I insert [myprice]>> into the [founditems] loop.>> >> Any ideas?>> >>> Select ean, format(price,2) as myprice>>>> Where xxxxx>>>> >>>> Then get it within WebDNA as [myprice].-------------------------------------------------------------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:
Extended [ConvertChars] (1997)
WebCatalog for Postcards ? (1997)
Generating Report Totals (1997)
'does not contain' operator needed ... (1997)
WebDNA & HTML Problems (2003)
reserved characters for field names? (1998)
Navigator 4.01 (1997)
Securing a Directory (2000)
Security (2006)
Cart Question (1998)
ReturnRaw and redirect one last question (1997)
Help formatting search results w/ table (1997)
Founditems context returning only 1 item (1997)
GoodPath and MoveFile (edited and reposted) (2000)
WebCat2b12 - nesting [tags] (1997)
SHOWIF/HIDEIF empty fields (2005)
Frames and WebCat (1997)
forming a SKU (1999)
PCS Frames-Default page is solution! (1997)
Server crashes when user saves or views html source (1998)