Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/04/2013, 03:34
jurena
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Cáceres
Mensajes: 3.735
Antigüedad: 16 años, 1 mes
Puntos: 300
Respuesta: Problema con JOIN

Prueba esto a ver si es lo que quieres
Código MySQL:
Ver original
  1.   nego.id,
  2.   nego.nombre,
  3.   ubi1.name departamento,
  4.   ubi2.name provincia,
  5.   ubi3.name distrito
  6. FROM `negocios` nego
  7.   INNER JOIN ubigeo ubi1 ON nego.departamento = ubi1.id
  8.   INNER JOIN ubigeo ubi2 ON nego.provincia  = ubi2.id
  9.   INNER JOIN ubigeo ubi3 ON nego.distrito = ubi3.id