$sql="SELECT Distinct orderheader.ord_number, orderheader.ord_refnum, orderheader.mov_number, orderheader.ord_tractor, orderheader.ord_hdrnumber, stops.stp_type, stops.cmp_name, company.cmp_address1, company.cty_nmstct, stops.cmp_id, stops.stp_phonenumber, stops.stp_schdtearliest, stops.stp_reftype, stops.stp_refnum, stops.stp_weight, stops.stp_weightunit, stops.stp_count, stops.stp_countunit
FROM orderheader, stops, company WHERE orderheader.ord_hdrnumber = stops.ord_hdrnumber AND company.cmp_id = stops.cmp_id AND orderheader.mov_number='$unit' ORDER BY stops.stp_schdtearliest ASC";
$rs=odbc_exec($conn,$sql);
|