To achieve:
thinkphp Code:
Public Function Myorder () {
$obj = M ();
$sql = "Select Group_concat (oc.courselist_id ORDER by oc.courselist_id DESC) as Courselist,o.order_id,o.user_id,o.user_ name,o.number,o.ordertime,o.status,o.amount,oc.courselist_id from Tb_order as O inner join tb_order_courselist as OC on O . order_id=oc.order_id where o.user_id= ". $_session[' user_id ']." GROUP by o.order_id ORDER by o.order_id Desc ";
$orderData = $obj->query ($sql);
foreach ($orderData as $value) {
$sql _list = "SELECT * from Tb_order_courselist where courselist_id in (". $value [' courselist ']. ")";
$course _list = $obj->query ($sql _list);
}
$this->assign ("Courselist", $course _list);
$this->assign ("OrderData", $orderData);
$this->display ();
}
Template code:
My order
Course Information
Video Duration
Unit Price
Order Amount
Order Status
Operation
<{$order .ordertime}> Order Number:
<{$order .number}>
"alt=" picture description "/><{$list .course_name}>
-
Teaching Teacher:
-
<{$list. teacher_names|mb_substr=0,5, ' Utf-8 '}>
-
Validity:
-
<{$list .valid}>
|
<{$list .lessontime}> min |
¥<{$list .course_price}> |
¥<{$order .amount}> |
Unpaid paid |
Delete Immediate Payment |
Reply to discussion (solution)
Front-end traversal data issues
Order Form Association Order Product table
Order_info and Order_goods
Draw a result set, traverse the loop
Order Form Association Order Product table
Order_info and Order_goods
Draw a result set, traverse the loop
I've come to the result set is the front-end traversal problem is a table how to play?
You can calculate the number of order item items and then merge the cells.
I have got out, gave up table, with Div platoon, now no problem,, points or points to everyone,