SM: MySQL and Numbers (BUG)

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 62838
interpreted = N
texte = The following query executed via command line or phpMyAdmin returns the correct price with 2 decimal places: SELECT thumb, title, itemid, price, round( price, 2 ) FROM items WHERE quantity >0 ORDER BY RAND( ) LIMIT 2 The same query executed via WebDNA DOES NOT WORK. The price is returned as a long string of numbers like: 1076756480 This has to be a WebDNA bug. For the record, I'm running WebDNA 6.0a under MacOS X Server 10.2.8. On 8/22/05 10:31 AM, "Clint Davis" wrote: > I'm also using 4.0.18... > > > On 8/22/05 10:24 AM, "Thierry Almy" wrote: > >> To me the code looks correct, we do it just like this ... using MySQL 4.0.18. >> >>> The following code displays nothing for the [myprice] variable... >>> >>> [sqlconnect >>> dbtype=MySQL&host=myipaddress&database=mydatabase&uid=myuser&pwd=mypass&conn >>> _var=conn1][/sqlconnect] >>> >>> [sqlexecute conn_ref=conn1&result_var=rs1] >>> SELECT >>> thumb,title,itemid,FORMAT(price,2) AS myprice >>> FROM items >>> WHERE viewable='Yes' >>> ORDER BY RAND() limit 2; >>> [/sqlexecute] >>> >>> [sqlresult result_ref=rs1] >>> [founditems] >>> [thumb]*[title]*[itemid]*[myprice] >>> [/founditems] >>> [/sqlresult] ------------------------------------------------------------- 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)
The following query executed via command line or phpMyAdmin returns the correct price with 2 decimal places: SELECT thumb, title, itemid, price, round( price, 2 ) FROM items WHERE quantity >0 ORDER BY RAND( ) LIMIT 2 The same query executed via WebDNA DOES NOT WORK. The price is returned as a long string of numbers like: 1076756480 This has to be a WebDNA bug. For the record, I'm running WebDNA 6.0a under MacOS X Server 10.2.8. On 8/22/05 10:31 AM, "Clint Davis" wrote: > I'm also using 4.0.18... > > > On 8/22/05 10:24 AM, "Thierry Almy" wrote: > >> To me the code looks correct, we do it just like this ... using MySQL 4.0.18. >> >>> The following code displays nothing for the [myprice] variable... >>> >>> [sqlconnect >>> dbtype=MySQL&host=myipaddress&database=mydatabase&uid=myuser&pwd=mypass&conn >>> _var=conn1][/sqlconnect] >>> >>> [sqlexecute conn_ref=conn1&result_var=rs1] >>> SELECT >>> thumb,title,itemid,FORMAT(price,2) AS myprice >>> FROM items >>> WHERE viewable='Yes' >>> ORDER BY RAND() limit 2; >>> [/sqlexecute] >>> >>> [sqlresult result_ref=rs1] >>> [founditems] >>> [thumb]*[title]*[itemid]*[myprice] >>> [/founditems] >>> [/sqlresult] ------------------------------------------------------------- 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:

PROBLEMS WITH PROTECT TAG (2004) WebCatalog2 Feature Feedback (1996) Renaming textA (1998) GuestBook example (1997) Date or time comparisons have bugs ... (1998) [format xs] freeze (1997) [WebDNA] New request for websites that currently run WebDNA (2009) WebCat Documentation (was [platform] tag?) (1998) More than one db with the same namn (was: WC2f3) (1997) Many $WebCat.exe processes (1998) WebCatalog for Postcards ? (1997) Anyone integrate askimet with webdna? (2007) WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997) Using [Include] Context (1999) One Hour Email (2002) [SearchString] usage (1997) Max Record length restated as maybe bug (1997) Further tests with the infamous shipCost (1997) WebCat Contest Now: Encrypt and Sell (1998) Problems with [Search] param - Mac Plugin b15 (1997)