Ver Mensaje Individual
  #10 (permalink)  
Antiguo 13/03/2008, 08:28
Avatar de EmaD
EmaD
 
Fecha de Ingreso: marzo-2008
Mensajes: 93
Antigüedad: 16 años, 1 mes
Puntos: 2
Re: Buscador php no toma datos

Como seria por ejemplo en mi caso.

Código PHP:
$consultatotal="SELECT p.title, p.author, p.description, p.content, p.id FROM paws_news p WHERE ((p.author LIKE '%".$elemabuscar."%') OR (p.title LIKE '%".$elemabuscar."%') OR (p.description LIKE '%".$elemabuscar."%') OR (p.content LIKE '%".$elemabuscar."%')) GROUP BY id"
Asi?

Código PHP:
"SELECT * , MATCH(p.title, p.author, p.description, p.content, p.id) AGAINST ('$busqueda') as Score FROM paws_news p WHERE MATCH (p.author LIKE '%".$elemabuscar."%') OR (p.title LIKE '%".$elemabuscar."%') OR (p.description LIKE '%".$elemabuscar."%') OR (p.content LIKE '%".$elemabuscar."%')) AGAINST ('$busqueda') ORDER BY Score ASC"

Es correcto asi? sino ayudame aunquesea ocn una luego las otras las modifico yo , pero para tener una referencia y ver como trabaja con match y against


Gracia snuevamente