Forum Moderators: coopster
$detailqry6 = "SELECT * FROM whse_order_detail WHERE order_no = '".$order_no."' AND order_qty!= 0";
$result6=mysql_query($detailqry6, $conn);
while ($row=mysql_fetch_array($result6, $conn)) {
$order_no2=$row["order_no"];
$id_no=$row["id_no"];
$sku=$row["sku"];
$order_qty2=$row["order_qty"];
$order_date=$row["order_date"];
$store2=$row["store"];
$detailqry7 = "SELECT * FROM whse_order_items WHERE id_no = '".$id_no."' ORDER BY location";
$result7=mysql_query($detailqry7, $conn);
while ($row=mysql_fetch_array($result7, $conn)) {
$id_no=$row["id_no"];
$sku=$row["sku"];
$description=$row["description"];
$vpc=$row["vpc"];
$package_qty=$row["package_qty"];
$location=$row["location"];
$min=$row["min"];
$max=$row["max"];
I want the output to be sorted by "location". When I do the Order By location statement, the first select statement only pulled out one row from the database. Is it possible for me to put the output somewhere, re-sort it, and then output it?
Thanks,
Jeff