RE: [WebDNA] List Files question
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 103679
interpreted = N
texte = Thanks Ken and everyone else who replied so quickly. I'll give yoursuggestions a go this afternoon when I return from an appointment.Muchas gracias!Michael A. DeLorenzoBroker - AssociateGeneral ManagerOlde Carriage Realty, Inc.Office: 904-824-4500Mobile: 904-377-5582Toll-Free: 1-800-555-6138Fax: 904-824-6866www.oldecarriage.com-----Original Message-----From: Kenneth Grome [mailto:kengrome@gmail.com] Sent: Wednesday, September 23, 2009 6:08 PMTo: talk@webdna.usSubject: Re: [WebDNA] List Files questionThis should be exceptionally fast:Use listfiles one time -- at the top of the page -- to create a table:[table name=pics.db&fields=fName][listfiles path=pics][filename][/listfiles][/table]Then do a lookup in the table to see if each file you're looking foractually exists ... and take advantage of the 'notfound' parameter in thelookup tag to avoid using showifs/hideif's and/or if/then/else:
You should be able to copy/paste this code into your page. I may havemissed something but I think this will do it. :)Sincerely,Ken Grome> I need help. My server is bogging down with the following code as it isrun> a few hundreds times on the same page. Is there anyone out there that can> help me increase the efficiency of this?> > > > [text]thumb=t[/text]> > [listfiles path=pics&name=[sku]A.jpg&exact=t]> > [showif [filename]!][text]thumb=f[/text][/showif]> > [/listfiles]> > > > > [showif [thumb]=t]
[/showif]> > [showif [thumb]=f][/showif]> > > > > > Basically I am looking in the pics folder to see if a photo exists and ifit> does then display the photo, if it does not then display a generic> placeholder photo. Maybe an if/then would be faster? Is there anystatistics> on how quick an if/then is compared to showif and hideif?> > > > Thanks in advance for all help.> > > > > > Michael A. DeLorenzo> > Broker - Associate> > General Manager> > Olde Carriage Realty, Inc.> > Office: 904-824-4500> > Mobile: 904-377-5582> > Toll-Free: 1-800-555-6138> > Fax: 904-824-6866> > www.oldecarriage.com> > > > ---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usold archives: http://dev.webdna.us/TalkListArchive/Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288
Associated Messages, from the most recent to the oldest:
Thanks Ken and everyone else who replied so quickly. I'll give yoursuggestions a go this afternoon when I return from an appointment.Muchas gracias!Michael A. DeLorenzoBroker - AssociateGeneral ManagerOlde Carriage Realty, Inc.Office: 904-824-4500Mobile: 904-377-5582Toll-Free: 1-800-555-6138Fax: 904-824-6866www.oldecarriage.com-----Original Message-----From: Kenneth Grome [mailto:kengrome@gmail.com] Sent: Wednesday, September 23, 2009 6:08 PMTo: talk@webdna.usSubject: Re: [WebDNA] List Files questionThis should be exceptionally fast:Use listfiles one time -- at the top of the page -- to create a table:[table name=pics.db&fields=fName][listfiles path=pics][filename][/listfiles][/table]Then do a lookup in the table to see if each file you're looking foractually exists ... and take advantage of the 'notfound' parameter in thelookup tag to avoid using showifs/hideif's and/or if/then/else:You should be able to copy/paste this code into your page. I may havemissed something but I think this will do it. :)Sincerely,Ken Grome> I need help. My server is bogging down with the following code as it isrun> a few hundreds times on the same page. Is there anyone out there that can> help me increase the efficiency of this?> > > > [text]thumb=t[/text]> > [listfiles path=pics&name=[sku]A.jpg&exact=t]> > [showif [filename]!][text]thumb=f[/text][/showif]> > [/listfiles]> > > > > [showif [thumb]=t][/showif]> > [showif [thumb]=f][/showif]> > > > > > Basically I am looking in the pics folder to see if a photo exists and ifit> does then display the photo, if it does not then display a generic> placeholder photo. Maybe an if/then would be faster? Is there anystatistics> on how quick an if/then is compared to showif and hideif?> > > > Thanks in advance for all help.> > > > > > Michael A. DeLorenzo> > Broker - Associate> > General Manager> > Olde Carriage Realty, Inc.> > Office: 904-824-4500> > Mobile: 904-377-5582> > Toll-Free: 1-800-555-6138> > Fax: 904-824-6866> > www.oldecarriage.com> > > > ---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usold archives: http://dev.webdna.us/TalkListArchive/Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288
"Michael A. DeLorenzo"
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:
Problems appending to database (1997)
Plugin or CGI or both (1997)
emailer (1997)
comparison to Lasso 6 or 7 (2004)
Deleting Multiple Database Records based on Checkbox (1998)
[WebDNA] TLS 1.2 and [tcpconnect] (2018)
'does not contain' operator needed ... (1997)
Weird Math and SV Bad News (1997)
[cart]'s ever get recycled? (2000)
Problems getting parameters passed into email. (1997)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
UNC path support in WebDNA 5.0 (2003)
Re:Running 2 two WebCatalog.acgi's (1996)
Help! WebCat2 bug (1997)
converchars in sendmail context.... (2004)
format and math on the fly (1998)
OK, here goes... (1997)
What am I missing (1997)
Duplicates (1998)
WebMerchant 2.1.2 (1998)