[ic] extending database
edl at newmediaems.com
Mon Dec 15 12:24:52 EST 2003
At 06:22 AM 12/15/2003 -0700, you wrote:
>I am not Mr Database, so please excuse this question if it seems
>Interchange 4.8.7/MySQL 8.23/Apache 1.3.27
>I run an aftermarket performance car parts webstore, and have something
>on the order of 20 to 30,000 parts in my catalog. Many of these parts
>apply to only one automobile, while many others apply to many
>automobiles. I'd like to extend the database such that each part number
>also has, say, 10 extra fields for specific car chassis codes. Then I
>can implement [somehow] a search routine where the user selects his
>make, then model, and can pull up everything available for the car. Or
>conversely, a part can be selected, and in the description, all
>applicable chassis codes will be shown.
>Anyone have a suggestion how I can do this?
If I were to do this, I would add one field called 'chassis_codes' to the
products table, which would contain space-separated list of the all the
codes that apply to the part. Then, your searches would be a simple matter
select * from products where chassis_codes like 'foo'
... for 'foo' you would reference the value which contains the determinate
code (i.e. [value chassis_code] would reference an input named chassis_code
from a form, etc.)
Listing all chassis_codes for a part is as simple as adding a loop to the
<b>Fits these models:</b><br>
[loop arg="[item-field chassis_codes]"]
- Ed L.
New Media E.M.S. Technology Solutions for Business
11630 Fair Oaks Blvd., #250 eCommerce | Consulting | Hosting
Fair Oaks, CA 95628 edl at newmediaems.com
(916) 961-0446 http://www.newmediaems.com
(866) 519-4680 Toll-Free (916) 961-0447 Fax
More information about the interchange-users