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:
Where's Cart Created ? (1997)
Upcoming 2.1 Release and PCS Committment (1997)
What is the maximum record length? (1998)
cart converting to scientific notation format (2001)
Re:Help name our technology! (1997)
New Website with Redakto CMS (2003)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
system crashes, event log (1997)
RE: Adding a product from another site (1997)
.. more on sliding discounts... (1997)
macosx 1 process, linux N processes, macosx chokes under load (2001)
memory in high traffic servers (2004)
There is a bug in 3.0.1 mac plug-in (1998)
Summing fields (1997)
Webcat deletes last line from Excel-saved text db (2004)
Checking for pre-existing passwords (1998)
The beginning (1997)
Mac: LModelDirector bug fix (1997)
listfiles sort?! (2005)
Cart Creation (2003)