Re: REPLACE & MAX/STARTAT parameters doesn't work?
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 36372
interpreted = N
texte = 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/
Associated Messages, from the most recent to the oldest:
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/
John Hill
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:
testing (2001)
[WebDNA] OT: what is the "right" platform ? (2009)
Date Sorting (1997)
Merging databases (1997)
Shopping carts and reloading pages (1997)
AppleScript/.db (was:FTP to WebStar) (2001)
docs for WebCatalog2 (1997)
Using EIMS instead of Emailer (1998)
Search anomaly aaarrgghh! (2000)
Credit Card Number checking (1997)
Emailer or [sendmail] questions ... (1998)
[/application] error? (1997)
emails sent via WebDNA 6.0a disappearing into thin air (2005)
Wanted: Broader string manipulation functions (1997)
Security for malls with different webmasters (1998)
Bug or syntax error on my part? (1997)
[searchString] (1997)
WebCat vs MS SiteServer? (1999)
RE: [taxRate] [TaxTotal] ? (1997)
Attention SMSI - DOCS Error (2004)