Hola,
Dadas estas 3 variables, tengo un query que funciona bien para un sola tabla.
(Muestro '$query' en boolean y no boolean)
Mi pregunta es : ¿Cual es la manera correcta de añadir otra tabla al query? ... separar tablas por comas en $db_table? ... agregar UNION? ... INNER JOIN ?
$db_table = "const_skills";
$db_fields = "id, value, practica_esp, practica_eng";
$db_query = "value,practica_esp,practica_eng";
$query = "SELECT $db_fields, MATCH($db_fields) AGAINST ('$s_char$terms[0] $s_char$terms[1] $s_char$terms[2] $s_char$terms[3] $s_char$terms[4] $s_char$terms[5]' IN BOOLEAN MODE) AS relevance FROM $db_table WHERE
MATCH($db_query) AGAINST ('$s_char$terms[0] $s_char$terms[1] $s_char$terms[2] $s_char$terms[3] $s_char$terms[4] $s_char$terms[5]' IN BOOLEAN MODE)
ORDER BY $sort_order";
// non-Boolean query, searches for exact phrase entered
$query = "SELECT $db_fields, MATCH($db_fields) AGAINST ('$trimmed' IN BOOLEAN MODE) AS relevance FROM $db_table WHERE MATCH($db_query) AGAINST ('$trimmed' IN BOOLEAN MODE)
ORDER BY $sort_order";
Saludos,