Help need to figure this out today!!! Advanced Question.

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 59795
interpreted = N
texte = Any or all your feedback is much appreciated and this will be a great topic for the the mail list/board. So here we go. Also... losing too much sleep over this one... PROBLEM: I have 2 related databases: 1 a listing of businesses (listings.db) and 2 a list of neighborhoods (hoods.db). They are related by HoodID being store in the listings database. Need to generate a drop down list for a form in Alphabetical (ascending order) of the neighborhoods from the Listings database but I cannot do this unless I search the hoods.db first then do an embedded search in the listings.db. I have 2 options below and I'm not sure if Option 2 is going to be toooo much work on the server and perform too many unnecessary searches. I would prefer the first option if someone knew a way to sort without the name of the hood in the listings.db. I'll go with option 2 if someone with lots of experience tells me that looping through 100 neighborhoods when the final outcome might only be a list of 10 and that the other 90 searches it looped through will not slow down the site. I need it to be fast and all information is dynamic and changes hourly as new businesses are added so a static menu is not an option. Hope everyone understands. Thanks. Option 1: ---------------------------------------------------------------- - First search the Listings database and sort by the Hood Field (that is the name of the neighborhood) Good: Searches Listings database for only the appropriate records then performs a lookup for the hood name. Bad: Only way to sort is if you have the Hood (name) field in the Listings database. This will cause redundant information and becomes a problem if the name of the Neighborhood is ever changed. Option 2: ---------------------------------------------------------------- - First search the Hoods database by city and state cookies sorting by Hood (name). - Second an embedded search is looped through the results of the first search passing the HoodID variable to the Listings and ONLY if there are records for this neighborhood that match the SECTION search criteria based on HoodID will a Neighborhood show up in the drop down menu. Good: Allows to create an Ascending Hood Menu without the need for the Hood field in Listings. Bad: Searches through unnecessary neighborhoods for matches in the Listings db when there are no matches. Could bog down the server with many unnecessary searches. I could post code but hopefully you'll be able to help based on this info. Reggie Branded Interactive 835 N. Wood St #103 Chicago, IL 60622 773.220.2851 www.BrandYourCompany.com ------------------------------------------------------------- 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: Help need to figure this out today!!! Advanced Question. ( 2004)
  2. Re: Help need to figure this out today!!! Advanced Question. ( Donovan Brooke 2004)
  3. Re: Help need to figure this out today!!! Advanced Question. ( Reggie from BRANDED 2004)
  4. Re: Help need to figure this out today!!! Advanced Question. ( Donovan Brooke 2004)
  5. Re: Help need to figure this out today!!! Advanced Question. ( Joe D'Andrea 2004)
  6. Help need to figure this out today!!! Advanced Question. ( Reggie from BRANDED 2004)
Any or all your feedback is much appreciated and this will be a great topic for the the mail list/board. So here we go. Also... losing too much sleep over this one... PROBLEM: I have 2 related databases: 1 a listing of businesses (listings.db) and 2 a list of neighborhoods (hoods.db). They are related by HoodID being store in the listings database. Need to generate a drop down list for a form in Alphabetical (ascending order) of the neighborhoods from the Listings database but I cannot do this unless I search the hoods.db first then do an embedded search in the listings.db. I have 2 options below and I'm not sure if Option 2 is going to be toooo much work on the server and perform too many unnecessary searches. I would prefer the first option if someone knew a way to sort without the name of the hood in the listings.db. I'll go with option 2 if someone with lots of experience tells me that looping through 100 neighborhoods when the final outcome might only be a list of 10 and that the other 90 searches it looped through will not slow down the site. I need it to be fast and all information is dynamic and changes hourly as new businesses are added so a static menu is not an option. Hope everyone understands. Thanks. Option 1: ---------------------------------------------------------------- - First search the Listings database and sort by the Hood Field (that is the name of the neighborhood) Good: Searches Listings database for only the appropriate records then performs a lookup for the hood name. Bad: Only way to sort is if you have the Hood (name) field in the Listings database. This will cause redundant information and becomes a problem if the name of the Neighborhood is ever changed. Option 2: ---------------------------------------------------------------- - First search the Hoods database by city and state cookies sorting by Hood (name). - Second an embedded search is looped through the results of the first search passing the HoodID variable to the Listings and ONLY if there are records for this neighborhood that match the SECTION search criteria based on HoodID will a Neighborhood show up in the drop down menu. Good: Allows to create an Ascending Hood Menu without the need for the Hood field in Listings. Bad: Searches through unnecessary neighborhoods for matches in the Listings db when there are no matches. Could bog down the server with many unnecessary searches. I could post code but hopefully you'll be able to help based on this info. Reggie Branded Interactive 835 N. Wood St #103 Chicago, IL 60622 773.220.2851 www.BrandYourCompany.com ------------------------------------------------------------- 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/ Reggie from BRANDED

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:

Up and running ... at last !! (1997) [WebDNA] How to generate md5 hash on linux (2009) absolute paths for databases? (1997) 3RD POST Character limit in [Search]? (1998) TPC Connect (1999) [SearchString] usage (1997) Quitting WebMerchant ? (1997) Multiple catalog databases and showcart (1997) Appending data from an IFrame (2002) ReturnRaw context (1997) (1997) WebCat2 - storing unformatted date data? (1997) grep question - how to strip spaces from the beginning ofa string? (2002) Choke # on Emailer (2002) Platform Switch (1997) Bad card db - *mislabled post* (1999) [OT] DNS Server Service (2003) Plugin or CGI or both (1997) Open Databases on Restart (1999) tcpconnect return (2003)