Thứ Hai, 2 tháng 3, 2026

ShopOrder - Show đơn hàng thuộc shopname

$shopid = $userid;

$sql = "SELECT * FROM  shop_orders";

$result = $db->sql_query($sql);

while($row = $db->sql_fetchrow($result)){

    $items = json_decode($row['order_text'], true);

    foreach($items as $item){

        if($item['shop_id'] == $shop_id){

            echo "Sản phẩm: ".$item['g_title'];

            echo " - Khách: ".$row['order_uname'];

            echo "<br>";

        }

    }

}

Không có nhận xét nào:

Đăng nhận xét