Ver Mensaje Individual
  #4 (permalink)  
Antiguo 30/11/2007, 08:19
Avatar de CésarBalaguer
CésarBalaguer
 
Fecha de Ingreso: octubre-2006
Ubicación: en mi casa
Mensajes: 181
Antigüedad: 18 años, 7 meses
Puntos: 0
Re: Busqueda con 4 tablas relacionadas

Cita:
Ssql2 = ""

Ssql2 = Ssql2 & "SELECT a.titulo_actividad, a.fec_inicio, a.fec_final, a.txt_detalle, "
Ssql2 = Ssql2 & "a.txt_direccion, b.txt_categoria, c.txt_contacto, c.txt_correo, "
Ssql2 = Ssql2 & "c.txt_telefono, d.filename, d.description1, d.filesize "

Ssql2 = Ssql2 & "FROM tagenda as a "
Ssql2 = Ssql2 & "LEFT OUTER JOIN tcategoria as b ON (a.cod_categoria=b.cod_categoria) "
Ssql2 = Ssql2 & "LEFT OUTER JOIN tagenda_contactos as c ON (a.id_agenda=c.id_agenda) "
Ssql2 = Ssql2 & "LEFT OUTER JOIN tagenda_pdf as d ON (a.id_agenda=d.id_agenda) "

Ssql2 = Ssql2 & "WHERE a.cod_estado=2 and uCase(txt_detalle)
Ssql2 = Ssql2 & "LIKE '%" & uCase(Request("palabra")) & "%'"