Re: REPLACE & MAX/STARTAT parameters doesn't work?
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 36373
interpreted = N
texte = I think John here has the right answer. For reference purposes, if youupgrade to 4.x, you get [replacefounditems] which does what you think itwould inside a [founditems] loop.John PeacockJohn 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 max parameters have no meaning. They are only useful if you are looping through the found items. I hope this helps.> > John.> > >The WC manual says that the REPLACE search parameters work exactly like> >Search command or [Search], but this doesn't appear to be true when I have> >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 a specific> >search that uses MAX/STARTAT is to use a SEARCH context with these> >parameters, then use a REPLACE context that matches all of the field values> >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=this does> >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 doing this> >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/
Associated Messages, from the most recent to the oldest:
I think John here has the right answer. For reference purposes, if youupgrade to 4.x, you get [replacefounditems] which does what you think itwould inside a [founditems] loop.John PeacockJohn 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 max parameters have no meaning. They are only useful if you are looping through the found items. I hope this helps.> > John.> > >The WC manual says that the REPLACE search parameters work exactly like> >Search command or [search], but this doesn't appear to be true when I have> >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 a specific> >search that uses MAX/STARTAT is to use a SEARCH context with these> >parameters, then use a REPLACE context that matches all of the field values> >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=this does> >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 doing this> >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/
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: Displaying Location (1997)
using listfiles to build a database? more (2000)
WebCatalog f2 Installation (1997)
eChecks (2000)
Bulk capture for Authorize.net (2004)
Toronto area? (1999)
Fax Broadcast (1998)
How About Credit Card Transactions (1998)
A question on sub-categories (1997)
ShowIf helper? (1998)
[WebDNA] location line item change password (2011)
California Tax Rates (1998)
WebCatalog for Postcards ? (1997)
OLD ORDERS (1998)
Running _every_ page through WebCat ? (1997)
Credit card processing - UK (1997)
Moment of Thanks (1997)
Setting up WebCatalog with Retail Pro data (1996)
RE: [WebDNA] Help me install (WebDNA 7 fastcgi install on Lion (2012)
limitation found on group searching (1997)