Re: Searching a database...

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 50598
interpreted = N
texte = Just thought I would update you and say that I have managed to get it sussed even with the inv>0 thing...Thanks for your help ;-)on 21/5/03 4:44 pm, Alan White at alan@streethreds.com wrote:> 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/ ------------------------------------------------------------- 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:

[SearchString] problem with [search] context (1997) Multiple CPUs? (2000) Opinion: [input] should be called [output] ... (1997) PROBLEM (1997) F3 crashing server (1997) charging? (2001) I need to get a [grep] (2003) Summing fields (1997) japanese characters (1997) OT:Programming Languages are Like Women (2004) Search Engine questions ... (2002) Authorize.net, SIM, tcpconnect and applescript (2003) Who is doing sign-ups-got it (1998) Unable to view next 101-200 (1997) Quit revisited (1997) Date calculation problems (1997) Local redirects ... (2005) [WebDNA] Bug in 6.2? (2009) problems with 2 tags (1997) set header in DB (no cart) (2003)