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 additional

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

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

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

2001-06-26 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-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 to define the extra options... ford_spec table: id

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. SNIP Why not have a table that contains carid and optionlink, where carid

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

2001-06-26 Thread scott [gts]
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 Extras. The problem

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 similar and I came up with an interesting way of approaching

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