Re: REPLACE & MAX/STARTAT parameters doesn't work?
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 36380
interpreted = N
texte = Thanks. I guess the WC manuals aren't 100% accurate for this command.Pete----- Original Message -----From: John Peacock
To: WebCatalog Talk Sent: Monday, August 21, 2000 3:36 PMSubject: Re: REPLACE & MAX/STARTAT parameters doesn't work?> I think John here has the right answer. For reference purposes, if you> upgrade to 4.x, you get [replacefounditems] which does what you think it> would inside a [founditems] loop.>> John Peacock>> John Hill wrote:> >> > Someone at Smith Micro can correct me if I'm wrong, but since the[replace] context does not use a [founditems]-like loop, the startat and maxparameters have no meaning. They are only useful if you are looping throughthe found items. I hope this helps.> >> > John.> >> > >The WC manual says that the REPLACE search parameters work exactlylike> > >Search command or [Search], but this doesn't appear to be true when Ihave> > >MAX=x and/or STARTAT=y parameters in my REPLACE statement.> > >> > >So far, the only way I have been able to perform a REPLACE of aspecific> > >search that uses MAX/STARTAT is to use a SEARCH context with these> > >parameters, then use a REPLACE context that matches all of the fieldvalues> > >found in the search. For example...> > >> > >************> > >> > >[!] This should replace the 3rd instance of USERID but it replaces ALL> > >instances of USERID [/!]> > >[REPLACE db=test.db&eqUSERIDdatarq=[userid]&startat=3&max=1]value=thisdoes> > >not work[/replace]> > >> > >[!] This is the workaround/kludge I have to use [/!]> > >[search db=test.db&eqUSERIDdatarq=[userid]&startat=3&max=1]> > > [founditems]> > > [replace> >>db=test.db&eqUSERIDdatarq=[userid]&eqFIELD1datarq=[field1]...&eqFIELD99datar> > >q=[field99]]value=this does work[/replace]> > > [founditems]> > >[/search]> > >> > >************> > >> > >So either this is a bug in WC, or the manual is wrong, or I am doingthis> > >incorrectly. Thoughts, solutions?> > >> > >Thanks> > >> > >Pete> > >> > >> > >-------------------------------------------------------------> > >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://search.smithmicro.com/> >> > ---------------------------> > John A. Hill> > john@genericaddress.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://search.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://search.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://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Thanks. I guess the WC manuals aren't 100% accurate for this command.Pete----- Original Message -----From: John Peacock To: WebCatalog Talk Sent: Monday, August 21, 2000 3:36 PMSubject: Re: REPLACE & MAX/STARTAT parameters doesn't work?> I think John here has the right answer. For reference purposes, if you> upgrade to 4.x, you get [replacefounditems] which does what you think it> would inside a [founditems] loop.>> John Peacock>> John Hill wrote:> >> > Someone at Smith Micro can correct me if I'm wrong, but since the[replace] context does not use a [founditems]-like loop, the startat and maxparameters have no meaning. They are only useful if you are looping throughthe found items. I hope this helps.> >> > John.> >> > >The WC manual says that the REPLACE search parameters work exactlylike> > >Search command or [search], but this doesn't appear to be true when Ihave> > >MAX=x and/or STARTAT=y parameters in my REPLACE statement.> > >> > >So far, the only way I have been able to perform a REPLACE of aspecific> > >search that uses MAX/STARTAT is to use a SEARCH context with these> > >parameters, then use a REPLACE context that matches all of the fieldvalues> > >found in the search. For example...> > >> > >************> > >> > >[!] This should replace the 3rd instance of USERID but it replaces ALL> > >instances of USERID [/!]> > >[REPLACE db=test.db&eqUSERIDdatarq=[userid]&startat=3&max=1]value=thisdoes> > >not work[/replace]> > >> > >[!] This is the workaround/kludge I have to use [/!]> > >[search db=test.db&eqUSERIDdatarq=[userid]&startat=3&max=1]> > > [founditems]> > > [replace> >>db=test.db&eqUSERIDdatarq=[userid]&eqFIELD1datarq=[field1]...&eqFIELD99datar> > >q=[field99]]value=this does work[/replace]> > > [founditems]> > >[/search]> > >> > >************> > >> > >So either this is a bug in WC, or the manual is wrong, or I am doingthis> > >incorrectly. Thoughts, solutions?> > >> > >Thanks> > >> > >Pete> > >> > >> > >-------------------------------------------------------------> > >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://search.smithmicro.com/> >> > ---------------------------> > John A. Hill> > john@genericaddress.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://search.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://search.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://search.smithmicro.com/
Pete Campbell
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:
cart ID (1998)
emailer (1997)
Triggers (2003)
Emailer [cart] file names (1997)
WC2b15 - [HTMLx]...[/HTMLx] problems (1997)
WebCatalog NT beta 18 now available (1997)
Nesting WebDNA in JavaScript (2003)
WebCat2b13MacPlugIn - [shownext method=post] ??? (1997)
[/application] error? (1997)
Single Link browsing (1997)
SHOWIF/HIDEIF empty fields (2005)
Country & Ship-to address & other fields ? (1997)
Reversed words (1997)
[Webcat 2]Next (1997)
creative use of webcatalog (1998)
Adding a product from another site (1997)
M$loth messes with our sites (again) 2004/02/03 (2004)
WebCat2b13MacPlugIn - [include] (1997)
Plugin or CGI or both (1997)
[showif]/[hideif] question (1997)