Ver Mensaje Individual
  #5 (permalink)  
Antiguo 16/12/2007, 21:42
Avatar de TolaWare
TolaWare
Colaborador
 
Fecha de Ingreso: julio-2005
Mensajes: 4.352
Antigüedad: 18 años, 10 meses
Puntos: 24
Re: 1 select para 2 tablas

Perdón
Cometí un error garrafal, me confundí la sintaxis del operador UNION.

La sintaxis correcta sería:

(SELECT * FROM table1 WHERE nombre LIKE "'%$busqueda%'")
UNION
(SELECT * FROM table2 WHERE nombre LIKE "'%$busqueda%'");

Mil disculpas.