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 not already exist, otherwise I just want to update it. It seems I am going the long way about this. Can't I get REPLACE to do it in one line of WebDNA code? Here is my sad solution:[TEXT]found=[LOOKUP db=sessions.db&value=[sessionid]&lookinfield=sessionid&returnfield=sessionid ¬found=][/TEXT] [SHOWIF [found]!] [REPLACE db=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:

    
  1. Re: REPLACE and/or APPEND (Christer Olsson 2002)
  2. Re: REPLACE and/or APPEND (Jesse Williams-Proudman 2002)
  3. Re: REPLACE and/or APPEND (Gary Krockover 2002)
  4. Re: REPLACE and/or APPEND (Chris List Recipient 2002)
  5. Re: REPLACE and/or APPEND (Pedro Rivera 2002)
  6. Re: REPLACE and/or APPEND (Jesse Williams-Proudman 2002)
  7. REPLACE and/or APPEND (Chris List Recipient 2002)
I want to add a record to a database (based on a session id) if it does not already exist, otherwise I just want to update it. It seems I am going the long way about this. Can't I get REPLACE to do it in one line of WebDNA code? Here is my sad solution:[text]found=[LOOKUP db=sessions.db&value=[sessionid]&lookinfield=sessionid&returnfield=sessionid ¬found=][/TEXT] [SHOWIF [found]!] [REPLACE db=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:

Bad match! (2002) [math] show=F exists? (1997) need help please (1997) webmerchant - Crediting Back (2000) What really killed WebDNA? (2007) docs for WebCatalog2 (1997) WebCat2: Items xx to xx shown, etc. (1997) WCS Newbie question (1997) [WebDNA] [OT] Apple iPad (2010) [WebDNA] WARNING Do not upgrade to OS X Server 5.04 (2015) Comments in db? (1997) Multiple prices (1997) [WriteFile] problems (1997) Renaming DB fields (2000) Nesting FoundItem Context (1997) Add to Cart & List of Products (1997) faxing orders (2000) Verify entry into a text field (2005) Fun with Dates - revisited (1997) Unexpected error (1997)