Jump to content


Photo

Filter Search Results


  • This topic is locked This topic is locked
2 replies to this topic

#1 chopperwalker

chopperwalker
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 27 September 2006 - 12:21 AM

I am finishing up an e-commerce site for my company. There is an advanced search feature in which I have included additional fields specific to the type of product. Basically, you can define (from select menus) the Manufacturer, the Category, the Color, the Style, Price range, and Width range and it will spit out the products that are pertinent to these results. Standard and working.
My goal is to have these menus included on the search results page. The options in the menus on results page should then be limited to the available options in the results returned. So, if you pick a manufacturer (submits query) the remaining menus will limit their options to product's attributes that are available from that Manufacturer. If there are 10 total colors in the system, and Manufacturer A only has 5 of those colors then only those 5 colors will be available.
I tried $_GETing the variables and doing a new query for each menu. It wasn't clean and I would like to avoid more queries since there will eventually be 30,000+ products. I am thinking about trying to run a unique() on each needed field of the returned results. Maybe there is a better approach, any ideas?

Thank you for your input

If I can get this running right and cleaned up I am going to submit it as an OsCommerce Contribute.
PHP Version 4.3.11, MySQL 4.0.24, Apache/1.3.33

#2 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 27 September 2006 - 12:37 PM

It really does depend on how you've got your database setup as to how easy it is.  As with most things, it's possible, but I don't think it's going to be easy.  Have you modified the database at all, or is it the default OsCommerce one?

Perhaps it would be better posted in the third-party forum.  Don't forget to include the version ;)

Regards
Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#3 chopperwalker

chopperwalker
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 27 September 2006 - 06:08 PM

It has been moved: http://www.phpfreaks....html#msg442532
PHP Version 4.3.11, MySQL 4.0.24, Apache/1.3.33




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users