Rank mysql search results by coulmn weighting

Reply

Join Date: May 2009
Posts: 81
Reputation: tulipputih is an unknown quantity at this point 
Solved Threads: 0
tulipputih tulipputih is offline Offline
Junior Poster in Training

Rank mysql search results by coulmn weighting

 
0
  #1
Jun 23rd, 2009
Hello everybody,
how do I rank mysql search results by column weighting?
thanks for your input.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 61
Reputation: TommyBs is an unknown quantity at this point 
Solved Threads: 11
TommyBs's Avatar
TommyBs TommyBs is offline Offline
Junior Poster in Training

Re: Rank mysql search results by coulmn weighting

 
1
  #2
Jun 23rd, 2009
what do you mean by column weighting?

If you want to choose a preference you just do

  1. SELECT * FROM table ORDER BY column_1, column_2 DESC
changing column_1 etc to whatever field you want to order by. You can order by more then one and you can do descending(DESC) or ascending(ASC) order
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 81
Reputation: tulipputih is an unknown quantity at this point 
Solved Threads: 0
tulipputih tulipputih is offline Offline
Junior Poster in Training

Re: Rank mysql search results by coulmn weighting

 
0
  #3
Jun 23rd, 2009
Hi Tommy,
I have several columns in my table 'plan'.
they are ability, noofstudents etc...every column has been weighted according to theirimportance/relevance in planning.
for example: ability: 075
motivation: 0.25
it is not an article search. it is a record search from a table.

thanks in advance.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 1
Reputation: denit is an unknown quantity at this point 
Solved Threads: 0
denit denit is offline Offline
Newbie Poster

Re: Rank mysql search results by coulmn weighting

 
0
  #4
Jun 23rd, 2009
please try to ellaborate more on column weighting i cant really understand the exact meaning of the word.
Last edited by denit; Jun 23rd, 2009 at 2:44 pm. Reason: wasnt clear
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 61
Reputation: TommyBs is an unknown quantity at this point 
Solved Threads: 11
TommyBs's Avatar
TommyBs TommyBs is offline Offline
Junior Poster in Training

Re: Rank mysql search results by coulmn weighting

 
0
  #5
Jun 23rd, 2009
just do
  1. ORDER BY weight_filter DESC
where weight_filter is the name of the column with that number in
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 81
Reputation: tulipputih is an unknown quantity at this point 
Solved Threads: 0
tulipputih tulipputih is offline Offline
Junior Poster in Training

Re: Rank mysql search results by coulmn weighting

 
0
  #6
Jun 24th, 2009
Originally Posted by denit View Post
please try to ellaborate more on column weighting i cant really understand the exact meaning of the word.
Tq..
What I intend to do is..
1. Instead of just list the search result..the percentage of how similar /match the keyword and the record will be displayed..

2. this percentage is based on how important those elements/column..say ability:1, motivation:0.75.

If it is not clear..I will explain in more detail..
MAny thanks
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC