Re: MySQL Wildcard Trouble

This WebDNA talk-list message is from

2006


It keeps the original formatting.
numero = 67346
interpreted = N
texte = Yeah for some reason webcat requires double %%, kind of weird. Sam McConnell wrote: > 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. > ------------------------------------------------------------- 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)
Yeah for some reason webcat requires double %%, kind of weird. Sam McConnell wrote: > 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. > ------------------------------------------------------------- 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/ Adam O'Connor

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:

SetMIMEHeader ATTN:John P. (2001) Thanks Grant (1997) RE: [sendmail]- bcc? (1998) calculating tax rates, mail order solutions and version 2 (1997) [WebDNA] proxy server domains mysteriously appear in webdna's domain list (2010) ShowNext (1997) searchable list archive (1997) [format 40s]text[/format] doesn't work (1997) [protect] error page (1997) MacAuthorize hub, no modal password dialog? (1997) Protecting Realms (1998) cart limit (2002) Searching for all records (1998) WebCat B13 Mac CGI -- Frames question (1997) [WebDNA] WebDNA Crashing or Not **YES** (2008) Getting Emailer to send mail (1997) Separate SSL Server (1997) [isfile] ? (1997) WebCat2 Append problem (B14Macacgi) (1997) I give up!! (1997)