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 2 two WebCatalog.acgi's (1996)
test (2003)
Bug Report, maybe (1997)
About (2001)
Number of Line Items (1998)
Re:multiple digests, please stop (1997)
ShowNext (1997)
Multiple catalog databases and showcart (1997)
Type 2 errors with WebCatalog.acgi (1997)
All choices on IE different than Netscape (1997)
[Sum] function? (1997)
Site Search Suggestions (2004)
Quit revisited (1997)
shipCost not working v2.1b4 (1997)
shipping calculations, lookup command (1997)
Return records from another (1997)
Format of Required fields error message (1997)
Separate SSL Server (1997)
SSL and reg web* (1997)
WebMerchant 1.6 and SHTML (1997)