Hola buenas, gracias por responder..
he hecho lo que me has dicho pero falla algo, el registro original sale asi
NumCliente: 47564
3 | 47564 | 126 | 80317048-10 | 4764 AFR | 39654225L | 2015-11-04 | 09:00:00.0000000 | Confirmada |
4 | 47564 | 126 | 80317048-10 | 4764 AFR | 39654225L | 2015-11-05 | 09:00:00.0000000 | Confirmada |
4 | 47564 | 126 | 80317048-11 | 4764 AFR | 39654225L | 2015-11-05 | 09:00:00.0000000 | Confirmada |
para ello uso este codigo:
Código PHP:
Ver originalif ($NumCliente == ''){
echo 'NumCliente? ';
$NumCliente = fgets(STDIN
); }
echo "NumCliente: " . $NumCliente . PHP_EOL;
array('Field' => 'Cliente', 'Criteria' => $NumCliente)
),
'setSize' => 0);
$result = $page->ReadMultiple($params);
$distribuciones = $result->ReadMultiple_Result->WTADistribucionesPorAutoriz;
echo 'Num_autorizacion | Cliente | Matricula_tractora | DNI_conductor | Fecha | Hora | Estado | Producto';
echo '<br>';
echo PHP_EOL;
foreach($distribuciones as $distrib) {
echo $distrib->Num_autorizacion . ' | ';
echo $distrib->Cliente . ' | ';
echo $distrib->Contrato. ' | ';
echo $distrib->Matricula_tractora . ' | ';
echo $distrib->DNI_conductor . ' | ';
echo $distrib->Fecha . ' | ';
echo $distrib->Hora . ' | ';
echo $distrib->Estado . ' | ';
echo $distrib->Producto ;
echo '<br>';
echo PHP_EOL;
}
}
else {
echo $distribuciones->Num_autorizacion . PHP_EOL;
}
//sleep(3);
echo 'Respuesta en ';
echo time() - $timeIni . ' segundos' ; ?>
Pero en cuanto pongo las tablas me pasan dos cosas, si la meto dentro del foreac merepite las tablas tantas veces como registros tenga:
Código PHP:
Ver original
foreach($distribuciones as $distrib) {
echo '<table class="table table-bordered table-striped datatable" id="table-2">';
echo '<thead>';
echo '<tr>';
echo '<th>';
echo '<div class="checkbox checkbox-replace">';
echo '<input type="checkbox" id="chk-1">';
echo '</div>';
echo '</th>';
echo '<th>Contrato</th>';
echo '<th>Cliente</th>';
echo '<th>Cupo</th>';
echo '<th>Matricula</th>';
echo '<th>DNI PASAPORTE</th>';
echo '<th>Matricula</th>';
echo '<th>Nombre</th>';
echo '</tr>';
echo '</thead>';
echo '<tbody>';
echo '<tr>';
echo '<td>';
echo '<div class="checkbox checkbox-replace">';
echo '<input type="checkbox" id="chk-1">';
echo '</div>';
echo '</td>';
echo '<td>Randy S. Smith</td>';
echo '<td>8.7</td>';
echo '<td>Social and human service</td>';
echo '<td>';
echo '<a href="#" class="btn btn-default btn-sm btn-icon icon-left">';
echo '<i class="entypo-pencil"></i>';
echo 'Edit';
echo '</a>';
echo '<a href="#" class="btn btn-danger btn-sm btn-icon icon-left">';
echo '<i class="entypo-cancel"></i>';
echo 'Delete';
echo '</a>';
echo '<a href="#" class="btn btn-info btn-sm btn-icon icon-left">';
echo '<i class="entypo-info"></i>';
echo 'Profile';
echo '</a>';
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td>';
echo '<div class="checkbox checkbox-replace">';
echo '<input type="checkbox" id="chk-1">';
echo '</div>';
echo '</td>';
echo $distrib->Num_autorizacion . ' | ';
echo $distrib->Cliente . ' | ';
echo $distrib->Contrato. ' | ';
echo $distrib->Matricula_tractora . ' | ';
echo $distrib->DNI_conductor . ' | ';
echo $distrib->Fecha . ' | ';
echo $distrib->Hora . ' | ';
echo $distrib->Estado . ' | ';
echo $distrib->Producto ;
echo '<br>';
echo PHP_EOL;
}
}
else {
echo $distribuciones->Num_autorizacion . PHP_EOL;
}
//sleep(3);
echo 'Respuesta en ';
echo time() - $timeIni . ' segundos' ; ?>
esto me monta esto:
NumCliente: 47564
3 | 47564 | 80317048-10 | 4764 AFR | 39654225L | 2015-11-04 | 09:00:00.0000000 | Confirmada | 126
Contrato Cliente Cupo Matricula DNI PASAPORTE Matricula Nombre
Randy S. Smith 8.7 Social and human service EditDeleteProfile
4 | 47564 | 80317048-10 | 4764 AFR | 39654225L | 2015-11-05 | 09:00:00.0000000 | Confirmada | 126
Contrato Cliente Cupo Matricula DNI PASAPORTE Matricula Nombre
Randy S. Smith 8.7 Social and human service EditDeleteProfile
4 | 47564 | 80317048-11 | 4764 AFR | 39654225L | 2015-11-05 | 09:00:00.0000000 | Confirmada | 126
Respuesta en 0 segundos
Contrato Cliente Cupo Matricula DNI PASAPORTE Matricula Nombre
Randy S. Smith 8.7 Social and human service EditDeleteProfile
Pero si la quito fuera del foreac me monta la tabla debajo de los resultados (COntinuo otro mensaje porque no cabe)