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:

Nested tags count question (1997) encripted storage (1998) OT: SEO (2007) GuestBook example (1997) Need NT Assist. w/ Emailer (2000) [isfile] ? (1997) getchars broken? (1997) WCS Newbie question (1997) Customer - again (1998) Credit card processing options. . . (1997) Date search bug (1998) Document Contains No Data! (1997) Sending Email (2004) Reverse text string (2002) WC2.0 Memory Requirements (1997) Sorting Dates (2000) Help name our technology! (1997) WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) Security Issues and WebCommerce Solution (1997) checking for [ and ] in form fields ... (1997)