Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/04/2009, 12:49
javiersf
 
Fecha de Ingreso: abril-2009
Mensajes: 23
Antigüedad: 15 años
Puntos: 0
Respuesta: mostrar nombre en vez de id

Cita:
Iniciado por By_George Ver Mensaje
Código PHP:
$sqlQueryemp mysql_query(”SELECT empNombreempTituloempDireccionempTextoempTelefonoempCPempWebempIdentificativoIDempEmailempDNIempCategoriaIDempRegionesID FROM empresas
$clausula”
$db_link
tienes que hacer tu consulta con inner join con las otras tablas para relacionarlas por medio de su id respectivo

algo asi

Código PHP:
$sqlQueryemp mysql_query(”SELECT empNombreempTituloempDireccionempTextoempTelefonoempCPempWebempIdentificativoIDempEmailempDNIempCategoriaIDempRegionesID FROM empresas INNER JOIN categorias ON categorias.id_categoria=empresas.empCategoriaID
INNER JOIN regiones ON regiones
.id_region=empresas.empRegionesID
INNER JOIN identificativos ON Identificativo
.id_identificativo=empIdentificativoID
$clausula”
$db_link

Gracias amigo voy a probarlo haber si por fin consigo que me aparesca en los resultados los nombres.

un saludazo xD