Re: [PHP] [OT-ish] Optional Extras.

2001-06-28 Thread Mark Maggelet
I don't see how this is weighted. I would suggest doing it the easy way and treating the options as keywords and just putting them all in a text field with a fulltext index. this will give you the weighting you want and it will be a lot easier to deal with, but you will have to watch out for thin

Re: [PHP] [OT-ish] Optional Extras.

2001-06-28 Thread Richard Lynch
I don't see how this is weighted. The count(car_id) and group_by should give a "score" for each car_id. I neglected to use "count(car_id) as score" and to add "order by score desc" though. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Re: [PHP] [OT-ish] Optional Extras.

2001-06-27 Thread Richard Lynch
How about solving both problems at once? :-) Yes, go with the N:N (the technical term for that car_option table) relation, *AND* give yourself a weighted search engine to boot! create table car (car_id auto_increment...); create table option (option_id auto_increment...); create table car_option

Re: [PHP] [OT-ish] Optional Extras.

2001-06-26 Thread Dave Mariner
- Original Message - From: "Rich Cavanaugh" <[EMAIL PROTECTED]> To: "Dave Mariner" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, June 26, 2001 1:53 AM Subject: RE: [PHP] [OT-ish] Optional Extras. > Dave, > I did something simi

RE: [PHP] [OT-ish] Optional Extras.

2001-06-26 Thread scott [gts]
s, so his solution was fast and simple and efficient. i agree with the second point, that having hundreds or thousands of options would definately degrade performance. > -Original Message- > From: Dave Mariner [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] [OT-ish] Optional

Re: [PHP] [OT-ish] Optional Extras.

2001-06-26 Thread Dave Mariner
- Original Message - From: "David Robley" <[EMAIL PROTECTED]> To: "Dave Mariner" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, June 26, 2001 4:32 AM Subject: Re: [PHP] [OT-ish] Optional Extras. > Why not have a table that contains c

Re: [PHP] [OT-ish] Optional Extras.

2001-06-26 Thread Dave Mariner
- Original Message - From: "..s.c.o.t.t.." <[EMAIL PROTECTED]> To: "Php-General" <[EMAIL PROTECTED]> Sent: Tuesday, June 26, 2001 7:35 AM Subject: RE: [PHP] [OT-ish] Optional Extras. > off the top of my head, you could try using a > "lookup table&qu

Re: [PHP] [OT-ish] Optional Extras.

2001-06-26 Thread David Robley
On Tue, 26 Jun 2001 05:23, Dave Mariner wrote: > Please excuse me if you consider this to be off-topic, but this is the > best place I can think of to ask the (slightly long-winded) question. > > Imagine you have a car database (MySQL driven). Different models have > different optional extras (air

RE: [PHP] [OT-ish] Optional Extras.

2001-06-25 Thread ..s.c.o.t.t..
off the top of my head, you could try using a "lookup table" to define the extra options... ford_spec table: id desc --- --- 1 air conditioning 2 whatever ford_cars table: car extra1 extra2 -- --- - 'contour' 1

RE: [PHP] [OT-ish] Optional Extras.

2001-06-25 Thread Rich Cavanaugh
Dave, I did something similar and I came up with an interesting way of approaching it: Assign IDs to each car (obviously). Assign an ID to each option. Match up your car IDs and option IDs in a seperate table. Here's some table defs: create table cars ( carid int auto_incremen