我有以下脚本,它是一个订单列表:
$manifest_query = tep_db_query("SELECT o.franchise_id, o.orders_id,
o.customers_id, o.delivery_name, o.delivery_street_address [...]");
while ($manifest = tep_db_fetch_array($manifest_query)){
?>
<?php echo $manifest['orders_id'] ;?><?php echo $manifest['delivery_name'] .''.
$manifest['delivery_street_address'] .'
'.
$manifest['delivery_city'].'
'.
$manifest['delivery_postcode'].'
'.
$manifest['delivery_state'].'
'. $manifest['customers_telephone'] ;?>
$products_query = tep_db_query("select products_model, products_name, products_quantity from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$manifest['orders_id'] . "'");
while ($products = tep_db_fetch_array($products_query)) {
?>
<?php echo$products['products_quantity'] . ' x ' . $products['products_name'] .'
' . ' '.$products['products_model'] .'
';?>
}
?>
}
?>打印$products变量的单元格每次重复一次,作为新的td,但如果有多个产品,我需要它在一个td中打印所有产品。我有点混乱吗?