Previous Order ( Last 5 orders )
query($querystr); if($db->num_rows()>0) { $counter = 0; while ($db->next_record() && $counter < 5) { $stored_order_id = $db->record[order_id]; $querystr1 = "SELECT * FROM aqua_order_master WHERE order_id = '$stored_order_id' AND order_status != 0 AND order_status != 5"; $db2->query($querystr1); if($db2->num_rows()>0) { $db2->next_record(); $stored_order_no = $db2->record[order_no]; $stored_order_day = $db2->record[order_day]; $stored_order_month = $db2->record[order_month]; $stored_order_year = $db2->record[order_year]; $stored_order_date = $stored_order_day.' / '.$stored_order_month.' / '.$stored_order_year; $counter = $counter + 1; $view_name = 'View_'.$stored_order_id; ?>
No
Order Number
Order Date