
17/07/2008, 12:13
|
| | Fecha de Ingreso: junio-2008
Mensajes: 145
Antigüedad: 16 años, 8 meses Puntos: 0 | |
Respuesta: Búsqueda de un texto en varios campos a la vez Gracias por tu ayuda quimfv, lo he intentado poner como me has dicho pero a no ser que se me haya colado algo no funciona ni con * ni poniendo todos los campos separados por comas después de los select. Me da este error:
Error de compilación de Microsoft VBScript (0x800A0409)
Constante de cadena sin terminar
Este es el código que tengo ahora:
<%if mmultiple = 1 then
sql = "Select * From (Select * from PELICULAS where Director like '%" & tmultiple & "%'
UNION DISTINCT
Select * from PELICULAS where Interpretes like '%" & tmultiple & "%'
UNION DISTINCT
Select * from PELICULAS where Titulo like '%" & tmultiple & "%'
) as seleccion
ORDER by seleccion.Titulo asc"
tabla.open sql,conexion
if tabla.eof then%>
También lo he probado así:
<%if mmultiple = 1 then
sql = "Select Id,Titulo,Interpretes,Director,Anio,Min,Genero,Pai s,Foto,Argumento From (Select Id,Titulo,Interpretes,Director,Anio,Min,Genero,Pai s,Foto,Argumento from PELICULAS where Director like '%" & tmultiple & "%'
UNION DISTINCT
Select Id,Titulo,Interpretes,Director,Anio,Min,Genero,Pai s,Foto,Argumento from PELICULAS where Interpretes like '%" & tmultiple & "%'
UNION DISTINCT
Select Id,Titulo,Interpretes,Director,Anio,Min,Genero,Pai s,Foto,Argumento from PELICULAS where Titulo like '%" & tmultiple & "%'
) as seleccion
ORDER by seleccion.Titulo asc"
tabla.open sql,conexion
tabla.open sql,conexion
if tabla.eof then%>
¿Alguna idea de que es lo que puede fallar?
Gracais de antemano. |