I have a table which reflects a purchase made by a client or buyer, which has an identifier that would be the number of the order, it reflects that the customer requested, but it shows me in several tds the data of the order use a group by but it did not work to put them in a single td This is the structure of the table from which I take the data: detail Here they are the data as shown in the table
And so they are shown in the td I want to organize them to show that all the products of an order are printed in a single td that is to say the order 15 to print in a single td all the products that were generated in that order
<div class="panel panel-info">
<div class="panel-heading text-center"><i class="fa fa-refresh fa-2x"></i><h3>Datos del pedido</h3></div>
<div class="table-responsive">
<table class="table table-bordered">
<thead class="">
<tr>
<th class="text-center">#</th>
<th class="text-center">Codigo del producto</th>
<th class="text-center">Cliente</th>
<th class="text-center">Cantidad de productos</th>
</tr>
</thead>
<tbody>
<?php
$pedidoU= ejecutarSQL::consultar("select * from detalle, producto,cliente");
$upp=1;
while($peU=mysql_fetch_array($pedidoU)){
echo '
<tr>
<td>'.$peU['NumPedido'].'<input type="hidden" name="num-pedido" value="'.$peU['NumPedido'].'"></td>
<td>'.$peU['CodigoProd'].'- '.$peU['NombreProd'].'</td>
<td>';
$conUs= ejecutarSQL::consultar("select * from cliente where NIT='".$peU['NIT']."'");
while($UsP=mysql_fetch_array($conUs)){
echo $UsP['Nombre'];
}
echo '<td>';
$conUs= ejecutarSQL::consultar("select Nombre,NumPedido,CodigoProd,CantidadProductos from detalle,cliente group by Nombre ");
while($UsP=mysql_fetch_array($conUs)){
echo $UsP['CantidadProductos'] ;
}'</td>
</tr>
</form>
</div>
';
$upp=$upp+1;
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>