Ver Mensaje Individual
  #6 (permalink)  
Antiguo 20/05/2008, 06:46
Avatar de DBMark
DBMark
 
Fecha de Ingreso: mayo-2008
Ubicación: Oxford
Mensajes: 35
Antigüedad: 16 años
Puntos: 6
Respuesta: Ordenar por orden de relevancia

Es posible que necesites usar la funcion FULLTEXT para hacer esto.
No puedo todavia dejar la URL - es dentro de ONLamp DOT com y es un articulo sobre Fulltext - pero dice:
Cita:
There are a few things to note when querying FULLTEXT indices. First, MySQL automatically orders the results by their relevancy rating. Second, queries that are longer than 20 characters will not be sorted.
Es decir, se ordena por relevancia.

Para construir index de FULLTEXT haz:
Cita:
ALTER TABLE blog_table
ADD FULLTEXT (main_title, story_field) ;
Entonces se puede hacer consulta asii :
Cita:
SELECT entryID,main_title, entry
-> FROM blog_table
-> WHERE MATCH (main_title,entry) AGAINST('dinero');
Nota: Desgraciadamente no funciona con INNOdb