List:General Discussion« Previous MessageNext Message »
From:Gerald L. Clark Date:May 12 2009 4:52pm
Subject:Re: selecting the 'best' match
View as plain text  
blackwater dev wrote:
> I have a hold car data such as color, model, make, year, etc.  I want to
> allow the user to answer some questions and I'll present them with the car
> that 'best' matches their criteria.  How do I do this?  I still want to
> return ones that don't match exactly but want the closer matches ordered at
> the top:
> 
> Table:cars
> 
> columns: car_id, make, model, year, color, condition
> 
> So if the user enterrs:
> 
> model: Toyota
> year: 1998
> condition:great
> color: blue
> 
> I would show them a blue 1998 good conditioned camry first but farther down
> in the list might still have a blue good condition 98 Honda.
> 
> Thanks!
> Perhaps:
SELECT * FROM cars order by model!='Toyota',model;

Thread
selecting the 'best' matchblackwater dev12 May
  • Re: selecting the 'best' matchJohan De Meersman12 May
    • Re: selecting the 'best' matchblackwater dev12 May
      • Re: selecting the 'best' matchJohan De Meersman12 May
      • Re: selecting the 'best' matchCurtis Maurand12 May
  • Re: selecting the 'best' matchGerald L. Clark12 May
  • Re: selecting the 'best' matchJoerg Bruehe15 May