Re: Searching a database...

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 50547
interpreted = N
texte = on 21/5/03 4:38 pm, Marc Kaiwi at marc@kaiwi.com wrote:> You're surely on the right track as you've described below but why do > you need a categories database to cross reference the category numbers > in the products db? The reason for doing this is so that categories can be added independently of the products database. i.e. We may want to keep the footwear category for when we get new stock in.Another reason for this is that in our admin area you can choose a category you want a product to be displayed in when you are adding it.I wouldn't know exactly where to start with changing the logic to add the CAT instead of the ID to the products.db.Sorry... I'm still not to savvy with WebDNA yet....MHO call it what it is in the products db. > > Just as you've described you're going to simply nest a few searches to > build a list of categories containing their respective products. > > good luck, > > On Wednesday, May 21, 2003, at 08:26 AM, Alan White wrote: > >> Hi Everyone >> >> I am currently trying to add additional search features to our site >> and am >> trying to figure out how to make a menu that pulls out only the >> Categories >> (i.e.. footwear etc) that are in the products database and have an >> inventory >> of > 0. >> >> I haven't even tried to get the if inv > 0 working yet as it is the >> next >> task, all I want to be able to do at the moment is pull out the >> available >> categories and I should be able to do a lot of what I am trying to get >> done >> (here's hoping anyway). >> >> My products db is like follows:- >> >> ID SKU ... ... ... BRAND CATEGORY ... ... etc >> 1 blah 8 3 >> >> I have a Categories database which is just :- >> >> ID CAT >> 1 Footwear >> 2 Accessories >> etc >> etc >> >> I have successfully pulled all of the categories into a menu using the >> categories.db but then I realised this wasn't a very good idea as you >> may >> not have product in each category. >> >> This is the code I used:- >> >> ---------------------------------------------------- >> >> [search db=admin/category.db&neIDdatarq=find_all&CATEGORYsort=1] >> >> >> >> [founditems] >> > value=results.html?cart=[cart]&the_CAT=[ID]&search_type=_CAT&RA=[rando >> m][ra >> ndom][random]>[CAT] >> [/founditems] >> [/search] >> >> ---------------------------------------------------- >> >> I know I have to use something similar to:- >> >> [search db=admin/products.db&neCATEGORYdatarq=find_all&CATEGORYsumm=T] >> >> Followed by a nested lookup in my search results to get the Category >> title >> and display it but I'm afraid I'm getting a little lost. >> >> Hope someone can help... >> >> Alan >> ------------------------------ >> http://www.streethreds.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/ >> >> > Signed: Marc Kaiwi > > > ------------------------------------------------------------- > 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/ ------------------------------------------------------------- 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/ Alan White

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:

Limiting user access to .tmpl files (1997) Which GUI HTML editors work with WC ? (1997) Date search - yes or no (1997) Happy New Year (2008) Pithy questions on webcommerce & siteedit (1997) OT: 800x600 (2003) Download URL & access on the fly ? (1997) [WebDNA] Build Name for 6.1 (2008) WebCatalog for Postcards ? (1997) Pull Down Search (2000) Cart # Starting at 1000 (2000) Searching multiple Databases (1997) Further on formula.db failure to calculate shipCost (1997) How is it done? (1998) emailer truncates last letter! (1997) Append again (1999) Can't test the beta (2000) PSC recommends what date format yr 2000??? (1997) Online reference (1997) SQL Madness (2005)