REPLACE and/or APPEND
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 41739
interpreted = N
texte = I want to add a record to a database (based on a session id) if it does notalready exist, otherwise I just want to update it. It seems I am going thelong way about this. Can't I get REPLACE to do it in one line of WebDNAcode? Here is my sad solution:[TEXT]found=[LOOKUPdb=sessions.db&value=[sessionid]&lookinfield=sessionid&returnfield=sessionid¬found=][/TEXT][SHOWIF [found]!] [REPLACEdb=sessions.db&eqsessionidDATAreq=[sessionid]]info=[info][/REPLACE][/SHOWIF][HIDEIF [found]!] [APPEND db=sessions.db]sessionid=[sessionid]&info=[info][/APPEND][/HIDEIF]Thanks-------------------------------------------------------------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 want to add a record to a database (based on a session id) if it does notalready exist, otherwise I just want to update it. It seems I am going thelong way about this. Can't I get REPLACE to do it in one line of WebDNAcode? Here is my sad solution:[text]found=[LOOKUPdb=sessions.db&value=[sessionid]&lookinfield=sessionid&returnfield=sessionid¬found=][/TEXT][SHOWIF [found]!] [REPLACEdb=sessions.db&eqsessionidDATAreq=[sessionid]]info=[info][/REPLACE][/SHOWIF][HIDEIF [found]!] [APPEND db=sessions.db]sessionid=[sessionid]&info=[info][/APPEND][/HIDEIF]Thanks-------------------------------------------------------------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/
Chris List Recipient
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:
Running _every_ page through WebCat ? (1997)
BR (1997)
sendmail for email (was Netforms) (1998)
deadlock (2000)
shipping calcs (1998)
[OT][OT] OSX email client (2002)
version history page for webcat on the SM site? (2000)
Table Loop Hoops (2000)
Sendmail and attachments? (1998)
Replacing a price with text (1998)
Silly Question (1997)
File Upload (1997)
X etc.... (1999)
Search returns all, not 20 (1997)
drop down selection list for a search (1998)
RE: OK, here goes... (1997)
WebMerchant and MacAuthorize Errors (1998)
Is this possible, WebCat2.0 and checkboxes (1997)
WebDelivery downloads alias, not original ? (1997)
[WebDNA] Listwords and newline (2011)