Re: ReplaceFoundItems Problem
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 52970
interpreted = N
texte = 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:> > [search db=tabed.db&geskudatarq=0]> [replacefounditems]comments=[grep search=
&replace=%0A][comments][/grep][/replacefounditems]> [commitdatabase db=tabed.db]> [/search]> > ... 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.> A) Why are you using [search] and [replacefounditems] when your [search] is for all records. The only reason to use [replacefounditems] is when you are only hitting some records in the database.B) Why are you adding [commitdatabase] in the middle of your [search] loop? This will just make sure that the search/replace takes _much_ longer. A [replace] always does an implied [exclusivelock] at the beginning and an implied [commitdatabase] at the end.C) Always use [url]D) No, really, always use [url]!!!This should do what you want:[replace db=tabed.db&geskudatarq=0]comments=[grep search=
&replace=[url]%0A[/url]][comments][/grep][/replace]HTHJohn-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 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/
Associated Messages, from the most recent to the oldest:
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:> > [search db=tabed.db&geskudatarq=0]> [replacefounditems]comments=[grep search=
&replace=%0A][comments][/grep][/replacefounditems]> [commitdatabase db=tabed.db]> [/search]> > ... 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.> A) Why are you using [search] and [replacefounditems] when your [search] is for all records. The only reason to use [replacefounditems] is when you are only hitting some records in the database.B) Why are you adding [commitdatabase] in the middle of your [search] loop? This will just make sure that the search/replace takes _much_ longer. A [replace] always does an implied [exclusivelock] at the beginning and an implied [commitdatabase] at the end.C) Always use [url]D) No, really, always use [url]!!!This should do what you want:[replace db=tabed.db&geskudatarq=0]comments=[grep search=
&replace=[url]%0A[/url]][comments][/grep][/replace]HTHJohn-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 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/
John Peacock
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:
Re:listfiles-looking for slick solution (1997)
WCf2 and nested tags (1997)
hiding blank fields (2003)
Help name our technology! (1997)
[FoundItems] solved - thanks (1997)
[WebDNA] Is there a D.E. database record limit? (2014)
Using Plug-In while running 1.6.1 (1997)
[WebDNA] CRON (2014)
!@#$$@@# formulas database, tax and freight. (2002)
New public beta available (1997)
Format all of a sudden doesn't work (1997)
Mixing and/or in searches (1998)
WebCat2 - Getting to the browser's username/password data (1997)
Problem with Setheader (2001)
THANKS (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
webcat restarting script on Linux? (1999)
stats (2001)
Changes to the List (1997)
multiple selected Checkboxes (1998)