Re: [WebDNA] [store] and [recall]: default db location

This WebDNA talk-list message is from

2015


It keeps the original formatting.
numero = 112079
interpreted = N
texte = Yeah I don't get it either. I make use of both globally accessible DBs = and the preparse script (as well as an site-wide include with a list of = prefs specific for that site) and don't see where this offers anything = new. What I'd love to have though is way to insert a comment right in a = closing tag, or somehow have the closing tag restate what the opening = tag was all about (i.e. showifs). But I'm sure this is just a pipe = dream. That goes for html tags too. Terry On Feb 6, 2015, at 9:31 AM, Donovan Brooke wrote: > Currently we have the =93^=94 character that points to a global scope. >=20 > We also have the pre and post parse scripts. >=20 > What is so difficult about setting variables in the prepares script? >=20 > [text]constant1=3Dblah[/text] > [math]pi=3D3.141592653[/math] >=20 >=20 > If you need to have them in a database so that you can =91store=92 and = =91recall=92 a single value....=20 >=20 > simply create your reserved.db in globals.. > =85.reserved.db=85 > RE_NAMERE_VALUE > constant1blah >=20 > then do this in your prepares script: >=20 > [function name=3Drecall] > [return][lookup = db=3D^reserved.db&lookinfield=3DRE_NAME&value=3D[params_string]&returnfiel= d=3DRE_VALUE¬found=3DNF][/return] > [/function] >=20 >=20 > Then do this on any page server wide. > [recall constant1] >=20 > or to save: >=20 > preparse script: > [function name=3Dstore] >=20 > [/function name=3Dstore] > [replace = db=3D^reserved.db&eqRE_NAMEdata=3D[name]&append=3DT]RE_VALUE=3D[value][/re= place] > [/function] >=20 > To call it, use this in your page: > [store name=3Dconstant1&value=3Dblah] >=20 >=20 > There are many more options / variations to creating constants (that = amazing survive a reboot) ;-) too..=20 >=20 > ?? >=20 > I don=92t get it.=20 >=20 > Donovan >=20 >=20 >=20 >=20 >=20 >=20 > On Feb 6, 2015, at 11:10 AM, Donovan Brooke wrote: >=20 >> I have an idea.. let=92s publicly spend resources rewriting the = WebDNA engine with basic tags and contexts that do things we already >> easily have the ability to do, but with less power and different = names. >>=20 >> Donovan >>=20 >>=20 >>=20 >>=20 >> On Feb 6, 2015, at 6:18 AM, Kenneth Grome = wrote: >>=20 >>>> A default "central" reserved.db is not a bad idea (could be=20 >>>> stored inside /WebDNA folder) ... >>>=20 >>> I agree. I think the default location of reserved.db should be >>> the /WebDNA folder since this is where all the other required db >>> files are stored, at least in the FastCGI version. >>>=20 >>>=20 >>>> but it would store all the information for the website which=20 >>>> could make it big and difficult to handle ... >>>=20 >>> Why would it matter if the same volume of data were stored in a >>> single db or in separate dbs? It's still the same amount of data >>> either way. Or will the reserved.db work differently than our >>> other dbs? >>>=20 >>> One thing that actually SHOULD work differently is that this db >>> should ignore the prefs and be flushed to disk every time [store] >>> is used. Otherwise newly stored values might be lost. >>>=20 >>>=20 >>>> Then we will anyway have [store=20 >>>> path=3D../../admin/reserved.db]var1=3DJoe[/store] and [recall=20 >>>> var1&path=3D../../admin/reserved.db] to add flexibility. >>>=20 >>> Exactly! But here's another way to add similar flexibility: >>>=20 >>> Use these tags for the default server-wide scope: >>>=20 >>> [store]var1=3DJoe[/store] >>> [recall var1] >>>=20 >>> Then use these for local scope which will default to using the >>> reserved.db in the same folder: >>>=20 >>> [localStore]var1=3DJoe[/localStore] >>> [localRecall var1] >>>=20 >>> Then if you really want to be flexible, allow the path option to >>> be used in these "local scope" tags like this: >>>=20 >>> [localStore path=3Da/b/c/reserved.db]var1=3DJoe[/localStore] >>> [localRecall name=3Dvar1&path=3Da/b/c/reserved.db] >>>=20 >>> But never allow the path option in the default [store] and >>> [recall] tags -- because the default reserved.db will always be >>> located in the /WebDNA folder, or in the location specified in the >>> preference file which in this case is webdna.ini. >>>=20 >>> Using this approach means we have the flexibility to move our >>> default reserved.db file somewhere else other than the /WebDNA >>> folder, but there will still be only one default reserved.db file >>> for WebDNA to deal with when it encounters [store] and [recall]. >>> Any other reserved.db files will be referenced by [localstore] and >>> [localrecall] and their locations will be the same folder when no >>> path is specified, or optionally location specified by the path >>> parameter. >>>=20 >>> :) >>>=20 >>> Regards, >>> Kenneth Grome >>> WebDNA Solutions >>> http://www.webdnasolutions.com >>> Web Database Systems and Linux Server Management >>>=20 >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> Bug Reporting: support@webdna.us >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] [store] and [recall]: default db location (WebDNA TPP 2015)
  2. Re: [WebDNA] [store] and [recall]: default db location (Terry Wilson 2015)
  3. Re: [WebDNA] [store] and [recall]: default db location (Donovan Brooke 2015)
  4. Re: [WebDNA] [store] and [recall]: default db location (Donovan Brooke 2015)
  5. Re: [WebDNA] [store] and [recall]: default db location (Donovan Brooke 2015)
  6. Re: [WebDNA] [store] and [recall]: default db location (christophe.billiottet@webdna.us 2015)
  7. Re: [WebDNA] [store] and [recall]: default db location (Kenneth Grome 2015)
  8. Re: [WebDNA] [store] and [recall]: default db location (christophe.billiottet@webdna.us 2015)
  9. [WebDNA] [store] and [recall]: default db location (Kenneth Grome 2015)
Yeah I don't get it either. I make use of both globally accessible DBs = and the preparse script (as well as an site-wide include with a list of = prefs specific for that site) and don't see where this offers anything = new. What I'd love to have though is way to insert a comment right in a = closing tag, or somehow have the closing tag restate what the opening = tag was all about (i.e. showifs). But I'm sure this is just a pipe = dream. That goes for html tags too. Terry On Feb 6, 2015, at 9:31 AM, Donovan Brooke wrote: > Currently we have the =93^=94 character that points to a global scope. >=20 > We also have the pre and post parse scripts. >=20 > What is so difficult about setting variables in the prepares script? >=20 > [text]constant1=3Dblah[/text] > [math]pi=3D3.141592653[/math] >=20 >=20 > If you need to have them in a database so that you can =91store=92 and = =91recall=92 a single value....=20 >=20 > simply create your reserved.db in globals.. > =85.reserved.db=85 > RE_NAMERE_VALUE > constant1blah >=20 > then do this in your prepares script: >=20 > [function name=3Drecall] > [return][lookup = db=3D^reserved.db&lookinfield=3DRE_NAME&value=3D[params_string]&returnfiel= d=3DRE_VALUE¬found=3DNF][/return] > [/function] >=20 >=20 > Then do this on any page server wide. > [recall constant1] >=20 > or to save: >=20 > preparse script: > [function name=3Dstore] >=20 > [/function name=3Dstore] > [replace = db=3D^reserved.db&eqRE_NAMEdata=3D[name]&append=3DT]RE_VALUE=3D[value][/re= place] > [/function] >=20 > To call it, use this in your page: > [store name=3Dconstant1&value=3Dblah] >=20 >=20 > There are many more options / variations to creating constants (that = amazing survive a reboot) ;-) too..=20 >=20 > ?? >=20 > I don=92t get it.=20 >=20 > Donovan >=20 >=20 >=20 >=20 >=20 >=20 > On Feb 6, 2015, at 11:10 AM, Donovan Brooke wrote: >=20 >> I have an idea.. let=92s publicly spend resources rewriting the = WebDNA engine with basic tags and contexts that do things we already >> easily have the ability to do, but with less power and different = names. >>=20 >> Donovan >>=20 >>=20 >>=20 >>=20 >> On Feb 6, 2015, at 6:18 AM, Kenneth Grome = wrote: >>=20 >>>> A default "central" reserved.db is not a bad idea (could be=20 >>>> stored inside /WebDNA folder) ... >>>=20 >>> I agree. I think the default location of reserved.db should be >>> the /WebDNA folder since this is where all the other required db >>> files are stored, at least in the FastCGI version. >>>=20 >>>=20 >>>> but it would store all the information for the website which=20 >>>> could make it big and difficult to handle ... >>>=20 >>> Why would it matter if the same volume of data were stored in a >>> single db or in separate dbs? It's still the same amount of data >>> either way. Or will the reserved.db work differently than our >>> other dbs? >>>=20 >>> One thing that actually SHOULD work differently is that this db >>> should ignore the prefs and be flushed to disk every time [store] >>> is used. Otherwise newly stored values might be lost. >>>=20 >>>=20 >>>> Then we will anyway have [store=20 >>>> path=3D../../admin/reserved.db]var1=3DJoe[/store] and [recall=20 >>>> var1&path=3D../../admin/reserved.db] to add flexibility. >>>=20 >>> Exactly! But here's another way to add similar flexibility: >>>=20 >>> Use these tags for the default server-wide scope: >>>=20 >>> [store]var1=3DJoe[/store] >>> [recall var1] >>>=20 >>> Then use these for local scope which will default to using the >>> reserved.db in the same folder: >>>=20 >>> [localStore]var1=3DJoe[/localStore] >>> [localRecall var1] >>>=20 >>> Then if you really want to be flexible, allow the path option to >>> be used in these "local scope" tags like this: >>>=20 >>> [localStore path=3Da/b/c/reserved.db]var1=3DJoe[/localStore] >>> [localRecall name=3Dvar1&path=3Da/b/c/reserved.db] >>>=20 >>> But never allow the path option in the default [store] and >>> [recall] tags -- because the default reserved.db will always be >>> located in the /WebDNA folder, or in the location specified in the >>> preference file which in this case is webdna.ini. >>>=20 >>> Using this approach means we have the flexibility to move our >>> default reserved.db file somewhere else other than the /WebDNA >>> folder, but there will still be only one default reserved.db file >>> for WebDNA to deal with when it encounters [store] and [recall]. >>> Any other reserved.db files will be referenced by [localstore] and >>> [localrecall] and their locations will be the same folder when no >>> path is specified, or optionally location specified by the path >>> parameter. >>>=20 >>> :) >>>=20 >>> Regards, >>> Kenneth Grome >>> WebDNA Solutions >>> http://www.webdnasolutions.com >>> Web Database Systems and Linux Server Management >>>=20 >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> Bug Reporting: support@webdna.us >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Terry Wilson

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:

Database not found in Include (2002) how to include a name in from or to using Sendmail? (2003) upgrade? (1997) Serving images from databases (1998) Conditional searching & displaying (1997) [OT] Bulk Email Software (2002) Multiple fields on 1 input (1997) Browser Check for WebDNA compatability (1999) WebCatalog for guestbook ? (1997) [WebDNA] Free Hosting Amazon (2011) Next X hits (1996) WebDNA Developer Resource Center (2002) Using Plug-In while running 1.6.1 (1997) passwords not working (2000) Re[2]: 2nd WebCatalog2 Feature Request (1996) plugin-acgi, different results (1997) Fw: Linux w/ apache (2000) autosensing lanague selection (1997) I'm tired of all this! (2000) Path of Events (1999)