Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/04/2010, 08:51
gabymar
 
Fecha de Ingreso: agosto-2008
Mensajes: 94
Antigüedad: 15 años, 8 meses
Puntos: 0
consulta de registro

buenos dias tengo un problema con mi consulta aqui me muestra mis registros, cada registro tiene una direccion de origen y destino a veces no tiene destino, cuando me muestra las direcciones el destino lo muestra igual para todos los registros que puedo hacer para que me muestre la direccion correcta de cada registro aqui coloco una parte del codigo, gracias


Código PHP:
if ($_POST['patron'] == "proveedor")
{

 
$sql "SELECT  * FROM tbuzon_puntual INNER JOIN tconfigurador  ON tbuzon_puntual.nu_solc_intr =tconfigurador.cSolicitud INNER JOIN tconfiguradores_proveedores ON tconfigurador.cCodConf=tconfiguradores_proveedores.cCodConf1 WHERE cStatus=0 && cCodConf= '$buscar' GROUP BY cSolicitud"
 
$resultad mysql_query($sql$conexion);
while(
$row mysql_fetch_array($resultad)) { 
$solicitud $row['cSolicitud']; 

 
$consult "SELECT nb_lugar FROM tbuzon_puntual WHERE nu_solc_intr = '$solicitud' && t_lugar = 1 ";
$resulta mysql_query($consult$conexion);
while(
$row mysql_fetch_array($resulta)) { 
         
$destino $row['nb_lugar']; 
    }

echo 
"<table border = '1'  CELLPADDING='0' CELLSPACING='0' bordercolor='#000066'> \n";

echo 
"<tr> \n";
echo 
"<td><b>Seleccione la Orden</b></td> \n";

/*echo "<td><b>Orden</b></td> \n";*/

echo "<td><b>Asignada a:</b></td> \n";

echo 
"<td><b>Actividad</b></td> \n";

echo 
"<td><b>Ruta</b></td> \n";

echo 
"</tr> \n";
while(
$row=mysql_fetch_array($result)) 

echo 
"<tr> \n";

echo 
"<td>$row[cSolicitud]</td> \n";
echo 
"<td>$row[cNombre] $row[cApellido]</td> \n";
echo 
"<td>$row[cActividad]</td> \n";
echo 
"<td>$row[nb_lugar] / $destino</td> \n";
echo 
"</tr> \n";

?>