Re: ReplaceFoundItems Problem

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 52971
interpreted = N
texte = John, Thanks for helping me out with my problem. The answer to all of your "why"= questions is that WebDNA is new to me and I'm trying to learn it in the = best way possible. Thanks again. Justin Carroll On Friday, November 6, 1942, John Peacock wrote: >Justin Carroll wrote: > >> I'm trying to search a field of my database and replace all >of the
tags with %0A. When I run this code: >>=20 >> [search db=3Dtabed.db&geskudatarq=3D0] >> [replacefounditems]comments=3D[grep >search=3D
&replace=3D%0A][comments][/grep][/replacefounditems] >> [commitdatabase db=3Dtabed.db] >> [/search] >>=20 >> ... it takes out all the
tags just fine but it doesn't >replace them with the %0A. Does anyone know why this may be happening? = Thanks. >>=20 > >A) Why are you using [search] and [replacefounditems] when your [search] = is for=20 >all records. The only reason to use [replacefounditems] is when you are = only=20 >hitting some records in the database. > >B) Why are you adding [commitdatabase] in the middle of your [search] = loop?=20 >This will just make sure that the search/replace takes _much_ longer. A=20 >[replace] always does an implied [exclusivelock] at the beginning and an = implied=20 > [commitdatabase] at the end. > >C) Always use [url] > >D) No, really, always use [url]!!! > >This should do what you want: > >[replace db=3Dtabed.db&geskudatarq=3D0]comments=3D[grep=20 >search=3D
&replace=3D[url]%0A[/url]][comments][/grep][/replace] > >HTH > >John > >--=20 >John Peacock >Director of Information Research and Technology >Rowman & Littlefield Publishing Group >4501 Forbes Boulevard >Suite H >Lanham, MD 20706 >301-459-3366 x.5010 >fax 301-429-5748 > > >------------------------------------------------------------- >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/ Associated Messages, from the most recent to the oldest:

    
  1. Re: ReplaceFoundItems Problem ( Rob Marquardt 2003)
  2. Re: ReplaceFoundItems Problem ( Brian Fries 2003)
  3. Re: ReplaceFoundItems Problem ( Justin Carroll 2003)
  4. Re: ReplaceFoundItems Problem ( John Peacock 2003)
  5. ReplaceFoundItems Problem ( Justin Carroll 2003)
John, Thanks for helping me out with my problem. The answer to all of your "why"= questions is that WebDNA is new to me and I'm trying to learn it in the = best way possible. Thanks again. Justin Carroll On Friday, November 6, 1942, John Peacock wrote: >Justin Carroll wrote: > >> I'm trying to search a field of my database and replace all >of the
tags with %0A. When I run this code: >>=20 >> [search db=3Dtabed.db&geskudatarq=3D0] >> [replacefounditems]comments=3D[grep >search=3D
&replace=3D%0A][comments][/grep][/replacefounditems] >> [commitdatabase db=3Dtabed.db] >> [/search] >>=20 >> ... it takes out all the
tags just fine but it doesn't >replace them with the %0A. Does anyone know why this may be happening? = Thanks. >>=20 > >A) Why are you using [search] and [replacefounditems] when your [search] = is for=20 >all records. The only reason to use [replacefounditems] is when you are = only=20 >hitting some records in the database. > >B) Why are you adding [commitdatabase] in the middle of your [search] = loop?=20 >This will just make sure that the search/replace takes _much_ longer. A=20 >[replace] always does an implied [exclusivelock] at the beginning and an = implied=20 > [commitdatabase] at the end. > >C) Always use [url] > >D) No, really, always use [url]!!! > >This should do what you want: > >[replace db=3Dtabed.db&geskudatarq=3D0]comments=3D[grep=20 >search=3D
&replace=3D[url]%0A[/url]][comments][/grep][/replace] > >HTH > >John > >--=20 >John Peacock >Director of Information Research and Technology >Rowman & Littlefield Publishing Group >4501 Forbes Boulevard >Suite H >Lanham, MD 20706 >301-459-3366 x.5010 >fax 301-429-5748 > > >------------------------------------------------------------- >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/ Justin Carroll

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:

Help! WebCat2 bug (1997) Monthly Reports (2000) Running _every_ page through WebCat ? (1997) RE: [WebDNA] Cannot get WebDNA and MySQL working. (2015) SV: Strange sort in search... (2000) writing cart to db (1998) thread7715.debug (1999) WebCat2 - [include] tags (1997) AppleScript does not work properly ... (2000) WebCat templates for TyphoonPro admin (1999) WebCatalog can't find database (1997) Am on the list? (1997) Emailer [cart] file names (1997) Need a web cat programmer (2000) The evolved Server Configuration Queston (2000) HELP WITH DATES (1997) Major OT shopping cart test request. (2002) WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) searching within same page (2000) There's a bug in the math context ... (1997)