Re: Cleaning strings for SQL with WebCat

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 63675
interpreted = N
texte = Thanks Donovan. Doesn't [URL] mostly handle line breaks and spaces? I guess my point is, what I am most concerned with is quotes, single quotes, semi-colons, etc. Those type of characters are *legal* within a -url if I am not mistaken. That is why I thought perhaps [grep] could detect quotes and replace them with \" -which is compatible with sql. For some reason this didn't work, perhaps I am doing it wrong. I am trying to do something like this: ex: cBody = "Hello World" , 'Hello World' [text]cBody=[grep search="&replace=\"][cBody][/grep] --- look for quotes and escape them [text]cBody=[grep search="&replace=\'][cBody][/grep] --- look for single quotes and escape them. Needed result: cBody = \"Hello World\" , \'Hello World\' Basically, look into the message body for quotes and single quotes and escape them for the sql db. Seems like the above should work, but it doesn't. Donovan Brooke wrote: > Adam O'Connor wrote: > >> Can anyone tell me the general method on cleaning strings with webcat >> for preparation to sql. For instance, is there a webcat method of >> cleaning/escaping strings like php's clean() or .net's string >> cleaning? I have been working with [convertchars] and [grep], but >> still haven't been too sucessful. Figure if I would ask before >> considering other methods, ie php, c#. Any help appriciated. >> >> -thanks for answering my last question Nitai > > > > [url][/url] > > will create asc11 characters of the non-url compatible characters.. > > Donovan > > > ------------------------------------------------------------- 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: Cleaning strings for SQL with WebCat ( "Adam O'Connor" 2005)
  2. Re: Cleaning strings for SQL with WebCat ( "Nitai @ ComputerOil" 2005)
  3. Re: Cleaning strings for SQL with WebCat ( "Adam O'Connor" 2005)
  4. Re: Cleaning strings for SQL with WebCat ( Donovan Brooke 2005)
  5. Cleaning strings for SQL with WebCat ( "Adam O'Connor" 2005)
Thanks Donovan. Doesn't [url] mostly handle line breaks and spaces? I guess my point is, what I am most concerned with is quotes, single quotes, semi-colons, etc. Those type of characters are *legal* within a -url if I am not mistaken. That is why I thought perhaps [grep] could detect quotes and replace them with \" -which is compatible with sql. For some reason this didn't work, perhaps I am doing it wrong. I am trying to do something like this: ex: cBody = "Hello World" , 'Hello World' [text]cBody=[grep search="&replace=\"][cBody][/grep] --- look for quotes and escape them [text]cBody=[grep search="&replace=\'][cBody][/grep] --- look for single quotes and escape them. Needed result: cBody = \"Hello World\" , \'Hello World\' Basically, look into the message body for quotes and single quotes and escape them for the sql db. Seems like the above should work, but it doesn't. Donovan Brooke wrote: > Adam O'Connor wrote: > >> Can anyone tell me the general method on cleaning strings with webcat >> for preparation to sql. For instance, is there a webcat method of >> cleaning/escaping strings like php's clean() or .net's string >> cleaning? I have been working with [convertchars] and [grep], but >> still haven't been too sucessful. Figure if I would ask before >> considering other methods, ie php, c#. Any help appriciated. >> >> -thanks for answering my last question Nitai > > > > [url][/url] > > will create asc11 characters of the non-url compatible characters.. > > Donovan > > > ------------------------------------------------------------- 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:

Upload files (2004) Bug in 4.5 - Needs to be fixed ASAP. (2002) PSC recommends what date format yr 2000??? (1997) Using Applescript to process WebCatalog functions (1998) Talk List Suggestions (1997) Is using [URL] recommended even on an email address? (1999) [CART] (1997) RE: [WebDNA] Security Images (Captcha) (2008) Max Record length restated as maybe bug (1997) Search/sort in URL Was: GuestBook example (1997) WebMerchant 1.6 and SHTML (1997) Shipping charges depending on tax rate? (1997) last word listed (2000) 3+ Levels of Navigation (2006) nested showif? (1998) wc 2 pro users - sites, quotes wanted (1997) need basic .xml help (2006) WebTV (1998) [thisurl] (2004) NT considerations (1997)