Re: Failed SQL Query

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 62741
interpreted = N
texte = That did it. Thanks Jesse! On 8/4/05 3:59 PM, "Jesse Proudman" wrote: > This is a stupid WebDNA bug but try this: > > [sqlconnect > dbtype=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 BY > orderstamp; > [/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-- ------------------------------------------------------------- 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: Failed SQL Query ( Clint Davis 2005)
  2. Re: Failed SQL Query ( Jesse Proudman 2005)
  3. Failed SQL Query ( Clint Davis 2005)
That did it. Thanks Jesse! On 8/4/05 3:59 PM, "Jesse Proudman" wrote: > This is a stupid WebDNA bug but try this: > > [sqlconnect > dbtype=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 BY > orderstamp; > [/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-- ------------------------------------------------------------- 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:

WebDNA on Intel Mac? (2006) Showing unopened cart (1997) too many files! (2006) Bug or syntax error on my part? (1997) Wrapping text (1998) Ampersand (1997) WebCat2final1 crashes (1997) unsubscribe (1997) Running 2 two WebCatalog.acgi's (1996) Time/date formatting %X doesn't work ... (1997) [WebDNA] Google Maps (2019) Error:Too many nested [xxx] contexts (1997) getting images' width/height (1998) Date Range search (1997) Sendmail problem (2002) WebCat for mass emailings (1997) Searching (2000) Just Testing (1997) Was 5.0 Pricing, now Sandbox versus Website and ruminating (2003) Encrypting the seed (2001)