Re: Don't know if this is a sily question...

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 50751
interpreted = N
texte = On 5/29/03 11:00 AM, Alan White wrote:>> If you need to really get into reusing small includes, you could consider >> top level include file that sets text variables. You could then easily use >> those variables to modify the lookup code > > Don't suppose you have a small example you could show me? > Well, since I cant come up with something off hand (no creativity until 4th Mountain Dew of the day)...Essentially this is the point...Include files are awesome. They are one of our most used tags..but they come with a price... Overhead. Instead of accessing the HD once to get a page of code to be executed, the file access in turn leads to another access and another.Your example showed an include inside a founditems loop. Imagine if you will a numfound of 100, or 500, or 1000.... Eeek.Making abstract music with that Hard drive are we? ;-)Now if you needed to do a lookup inside a founditems loop, which is quite common, then the variables you need to lookup on will likely come from values found in the data you searched on to begin with. However, if you wanted to use an include to contain the whole search code, yet that causes inherent issues with multiple searches not really being the same (exactly anyhow)... You could set simple variables at the top of the page: [text]firstsearchtitle=[lookup something][/text] [text]firstsearchvar=[lookup something][/text]Then the search could use this firstsearchvar in the search parameters: [search db=xxx.db&eq[firstsearchtitle]dataRQ=[firstsearchvar]]Of course there has to be valid reasons for going this extra step.. Which off hand would be a reusable search form/layout that needs to search on some variable (changing) values.HTH Alex Alex J McCombie New World Media Chief Information Officer Box 124 888/892.6379 MartVille, NY 13111 Alex@NewWorldMedia.com http://OurClients.comInterface Designer WebDNA Programmer Database Designer------------------------------------------------------------- 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://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Don't know if this is a sily question... (Phillip Bonesteele 2003)
  2. Re: Don't know if this is a sily question... (Kenneth Grome 2003)
  3. Re: Don't know if this is a sily question... (Brian Fries 2003)
  4. Re: Don't know if this is a sily question... (Kenneth Grome 2003)
  5. Re: Don't know if this is a sily question... (Kenneth Grome 2003)
  6. Re: Don't know if this is a sily question... (Brian Fries 2003)
  7. Re: Don't know if this is a sily question... (devaulw@onebox.com 2003)
  8. Re: Don't know if this is a sily question... (Kenneth Grome 2003)
  9. Re: Don't know if this is a sily question... (John Peacock 2003)
  10. Re: Don't know if this is a sily question... (Brian Fries 2003)
  11. Re: Don't know if this is a sily question... (Alex McCombie 2003)
  12. Re: Don't know if this is a sily question... (John Peacock 2003)
  13. Re: Don't know if this is a sily question... (Alex McCombie 2003)
  14. Re: Don't know if this is a sily question... (Bob Minor 2003)
  15. Re: Don't know if this is a sily question... (Alan White 2003)
  16. Re: Don't know if this is a sily question... (Alan White 2003)
  17. Re: Don't know if this is a sily question... (Alex McCombie 2003)
  18. Re: Don't know if this is a sily question... (John Peacock 2003)
  19. Re: Don't know if this is a sily question... (Alan White 2003)
On 5/29/03 11:00 AM, Alan White wrote:>> If you need to really get into reusing small includes, you could consider >> top level include file that sets text variables. You could then easily use >> those variables to modify the lookup code > > Don't suppose you have a small example you could show me? > Well, since I cant come up with something off hand (no creativity until 4th Mountain Dew of the day)...Essentially this is the point...Include files are awesome. They are one of our most used tags..but they come with a price... Overhead. Instead of accessing the HD once to get a page of code to be executed, the file access in turn leads to another access and another.Your example showed an include inside a founditems loop. Imagine if you will a numfound of 100, or 500, or 1000.... Eeek.Making abstract music with that Hard drive are we? ;-)Now if you needed to do a lookup inside a founditems loop, which is quite common, then the variables you need to lookup on will likely come from values found in the data you searched on to begin with. However, if you wanted to use an include to contain the whole search code, yet that causes inherent issues with multiple searches not really being the same (exactly anyhow)... You could set simple variables at the top of the page: [text]firstsearchtitle=[lookup something][/text] [text]firstsearchvar=[lookup something][/text]Then the search could use this firstsearchvar in the search parameters: [search db=xxx.db&eq[firstsearchtitle]dataRQ=[firstsearchvar]]Of course there has to be valid reasons for going this extra step.. Which off hand would be a reusable search form/layout that needs to search on some variable (changing) values.HTH Alex Alex J McCombie New World Media Chief Information Officer Box 124 888/892.6379 MartVille, NY 13111 Alex@NewWorldMedia.com http://OurClients.comInterface Designer WebDNA Programmer Database Designer------------------------------------------------------------- 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://webdna.smithmicro.com/ Alex McCombie

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:

archives down (2001) sendmail formatting (2001) Close-to Comparison Code (1998) RequiredFields template (1997) [date format] w/in sendmail (1997) Date search - yes or no (1997) syntax question, not in online refernce (1997) Order not created error (1997) [WebDNA] contents of db files disappearing including triggers.db (2019) WC Database Format (1997) Country & Ship-to address & other fields ? (1997) installing webcatalog problem. HELP! (1998) [OT] Mime Headers / Meta-Tags (2003) RE: IIS4b2 and WebCatalog b19 (1997) Help! WebCat2 bug (1997) Search Engine questions ... (2002) [if][/if] weirdness (2000) Showif Or (2000) auto-stripping of spaces (1997) Re:Frames and cart values (1998)