Re: Failed SQL Query
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 62740
interpreted = N
texte = This is a stupid WebDNA bug but try this:[sqlconnectdbtype=MySQL&host=216.168.63.56&database=sunshop- benelliusa&uid=NunYaBidness&pwd=NunYaBidness&conn_var=conn1][/sqlconnect][sqlexecute conn_ref=conn1&result_var=rs4]SELECT items,itemquantity,prices FROM transaction WHERE (items like '123->%%'OR items like '%%->123->%%' OR items like '%%->123' OR items='123') ORDER BYorderstamp;[/sqlexecute][sqlresult result_ref=rs4][founditems][items] | [itemquantity] | [prices]
[/founditems][/sqlresult]Essentially you have to escape a % with another %, so % turns into: %%. It doesn't make any sense and I was lucky to stumble on it but it fixed it.Try it out.On Aug 4, 2005, at 1:54 PM, Clint Davis wrote:> I'm trying to query a MySQL database containing a table named > transaction.> The transaction table has numerous fields some of which are items,> itemquantity, and prices. The items field contains data that looks like> this:> 104->123->130--Jesse ProudmanBlue Box Group, LLCp. +1.800.613.4305 x801e. jesse@blueboxgrp.com-------------------------------------------------------------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:
This is a stupid WebDNA bug but try this:[sqlconnectdbtype=MySQL&host=216.168.63.56&database=sunshop- benelliusa&uid=NunYaBidness&pwd=NunYaBidness&conn_var=conn1][/sqlconnect][sqlexecute conn_ref=conn1&result_var=rs4]SELECT items,itemquantity,prices FROM transaction WHERE (items like '123->%%'OR items like '%%->123->%%' OR items like '%%->123' OR items='123') ORDER BYorderstamp;[/sqlexecute][sqlresult result_ref=rs4][founditems][items] | [itemquantity] | [prices]
[/founditems][/sqlresult]Essentially you have to escape a % with another %, so % turns into: %%. It doesn't make any sense and I was lucky to stumble on it but it fixed it.Try it out.On Aug 4, 2005, at 1:54 PM, Clint Davis wrote:> I'm trying to query a MySQL database containing a table named > transaction.> The transaction table has numerous fields some of which are items,> itemquantity, and prices. The items field contains data that looks like> this:> 104->123->130--Jesse ProudmanBlue Box Group, LLCp. +1.800.613.4305 x801e. jesse@blueboxgrp.com-------------------------------------------------------------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/
Jesse Proudman
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:
mem leak: webcat (2001)
Associative lookup style? + bit more (1997)
Multiple SSL Keys (1998)
Running _every_ page through WebCat ? (1997)
WebCatalog vs. Cold Fusion (1998)
WebCat2: Found Items syntax, etc. (1997)
[WebDNA] v7 Stress Test and Strange Behaviour (2012)
[quantity] within formulas (1997)
Database Program (1997)
Root Folder problems cont. (1998)
WebCat2.0 [format thousands .0f] no go (1997)
Cart Question: The Epic Saga (1998)
Tea Room trouble (1997)
[WebDNA] API Code - IP to Country code and zip Code to us census (2000) (2011)
Emailer help....! (1997)
problems with WebCat-Plugin ()
[WebDNA] Comparing fields in a search (2010)
Problems with shopping cart (1997)
ups quickcost [repost] (1999)
[WebDNA] Apache configuration fail when... (2013)