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:
strange IE 4.0 (1998)
Hiding HTML and breaking the page (1997)
Multi-processor Mac info ... (1997)
find with exceptions (1997)
autocommit problem (1998)
Mac Sever Web Hosting (1999)
Links and urls (2005)
Question about Webcatalog and Webstar for Mac OS X (1998)
mime types (2003)
Search Engine questions ... (2002)
Faxing orders in place of email (1997)
WebCat b13 CGI -shownext- (1997)
[WebDNA] tcp connect who is (2008)
Cookies not setting on IE (2002)
OT: 4.5 Unix License Value? (2004)
Exists? (1997)
Just a thought (1998)
auto adding SKUs w/DB helper (1998)
.html processing? (1998)
serial number generation (1997)