Re: MySQL Wildcard Trouble

This WebDNA talk-list message is from

2006


It keeps the original formatting.
numero = 67344
interpreted = N
texte = Adam O'Connor wrote: > Try: > > LIKE %%YourColumn%% > > > > > > Matthew Bohne wrote: >> Build the search string first... >> >> [text show=f]strQuery=[url]"SELECT * FROM Classifieds WHERE AdText >> LIKE '%[/url][_textstring][url]%'"[/url][/text] >> >> then search using [unurl][strQuery][/unurl]... Or try it without the >> url/unurl combo. >> >> >> >> Sam McConnell wrote: >>> Hello, >>> >>> I'm having a bit of trouble with WebDNA and MySQL. I need to query a >>> table in the database where the text field matches a search. The >>> problem I'm having is that WebDNA doesn't work with the wildcard >>> syntax. >>> >>> Basically, I'm trying to do "SELECT * FROM Classifieds WHERE AdText >>> LIKE '%[_textstring]%'", but "%" seems to cause an error with >>> WebDNA. If I take out the "%", the query works. >>> >>> Thanks >>> >> >> >> ------------------------------------------------------------- >> 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/ > > > ------------------------------------------------------------- > 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/ > > Thanks Guys, I tried with building the string first, but got the same result. Then I tried the "LIKE %%Column%%", and it worked. Again, thanks for your help. -- Sam McConnell Software Developer The GoTriCities Network - http://www.gotricities.net/ Phone: 423-392-1757 ------------------------------------------------------------- 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: MySQL Wildcard Trouble ( Adam O'Connor 2006)
  2. Re: MySQL Wildcard Trouble ( Adam O'Connor 2006)
  3. Re: MySQL Wildcard Trouble ( Sam McConnell 2006)
  4. Re: MySQL Wildcard Trouble ( Adam O'Connor 2006)
  5. Re: MySQL Wildcard Trouble ( Matthew Bohne 2006)
  6. MySQL Wildcard Trouble ( Sam McConnell 2006)
Adam O'Connor wrote: > Try: > > LIKE %%YourColumn%% > > > > > > Matthew Bohne wrote: >> Build the search string first... >> >> [text show=f]strQuery=[url]"SELECT * FROM Classifieds WHERE AdText >> LIKE '%[/url][_textstring][url]%'"[/url][/text] >> >> then search using [unurl][strQuery][/unurl]... Or try it without the >> url/unurl combo. >> >> >> >> Sam McConnell wrote: >>> Hello, >>> >>> I'm having a bit of trouble with WebDNA and MySQL. I need to query a >>> table in the database where the text field matches a search. The >>> problem I'm having is that WebDNA doesn't work with the wildcard >>> syntax. >>> >>> Basically, I'm trying to do "SELECT * FROM Classifieds WHERE AdText >>> LIKE '%[_textstring]%'", but "%" seems to cause an error with >>> WebDNA. If I take out the "%", the query works. >>> >>> Thanks >>> >> >> >> ------------------------------------------------------------- >> 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/ > > > ------------------------------------------------------------- > 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/ > > Thanks Guys, I tried with building the string first, but got the same result. Then I tried the "LIKE %%Column%%", and it worked. Again, thanks for your help. -- Sam McConnell Software Developer The GoTriCities Network - http://www.gotricities.net/ Phone: 423-392-1757 ------------------------------------------------------------- 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/ Sam McConnell

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:

Faxing orders in place of email (1997) Mime Headers for Mail (1998) What about this [delete] situation? (1998) WebCat2b12 - nesting [tags] (1997) wc 2 pro users - sites, quotes wanted (1997) [referrer] tag (1997) PIXO Support (1997) The code, one more time. (2003) [ot] g5 xserve drives (2004) off topic fetch vs PCS photomaster (1997) RE: Database Structure? (1998) Nested Loops and SHOWIFs (1997) Round up prices (2000) Stumpted Again (1997) Big Databases (1997) Email within tmpl ? (1997) Country & Ship-to address & other fields ? (1997) RequiredFields parameter (1998) payflowpro problem #2 (2003) updating checkbox in a db (1998)