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 thecorrect price with 2 decimal places:SELECT thumb, title, itemid, price, round( price, 2 )FROM itemsWHERE quantity >0ORDER BY RAND( )LIMIT 2The same query executed via WebDNA DOES NOT WORK. The price is returned as along string of numbers like: 1076756480This has to be a WebDNA bug. For the record, I'm running WebDNA 6.0a underMacOS 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:
The following query executed via command line or phpMyAdmin returns thecorrect price with 2 decimal places:SELECT thumb, title, itemid, price, round( price, 2 )FROM itemsWHERE quantity >0ORDER BY RAND( )LIMIT 2The same query executed via WebDNA DOES NOT WORK. The price is returned as along string of numbers like: 1076756480This has to be a WebDNA bug. For the record, I'm running WebDNA 6.0a underMacOS 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:
OT- Move SQL DB's (2004)
Field name-subcategory (1997)
I'm new be kind (1997)
[WebDNA] Migration from 6.2 to 7. Problems with writing to DB's (2012)
WebCat2: Found Items syntax, etc. (1997)
[WebDNA] Text Variable in Search (2010)
type 2 errors with ssl server (1997)
Newbie Tax Question (1997)
WebCatalog 2.0 b 15 mac (1997)
Using Applescript to process WebCatalog functions (1998)
question: search return in order (1997)
Sorry, WebDNA Server Not Running! (2005)
setlineitem quantity to zero? (2000)
E-mailer application times out (1998)
Question re: FlushDatabases (1997)
WebTen and WebCat (1997)
using WebCat for Associate Programs? (1998)
Multiple cart additions (1997)
oops private message leaked into talk list (1997)
method of payment (1997)