MySQL Ordering Results by the order of Where Clause Matched -


I have a query that weighs a phrase on the spaces and needs to see the best match for the phrase . It needs to be back before that match. I'm trying to do this in a single query where clause is it possible? I am trying something with these lines:

For: My Phrase

Choose a name from my name where name = "My phrase" or "% my phrase%" or Name "% My%" and name like "% phrase%") or (like "name% my name" or name like "% phrase%") range 5;

In fact, in the order of the top five matches where the clauses are mailed, I know that by default, MySQL evaluates the conditions in a highest way whether it in any way evaluates them in order Is it bound to? And if so, how can I make this result, where does it match?

Use full text instead Find it faster, more flexible and allows you to remove results is.

  SELECT ... against the MATCH (col_name) Order by the DESC ('my firas') against Tbl_name WHERE MATCH (col_name) from AS score;  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -