質問編集履歴

2

ミス

2023/02/25 09:05

投稿

Nefa
Nefa

スコア0

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,6 @@
1
1
  ### 実現したいこと
2
2
 
3
- ブラウザ購入履歴画面に、購入した商品のや日にち、商品名などbuy_his_tblから情報を表示することです。
3
+ ブラウザ購入履歴画面に、購入した商品のや日にち、商品名などbuy_his_tblやproduct_tblなどから情報を表示することです。
4
4
  教えて下さい。お願いします。
5
5
 
6
6
  ### 前提

1

コード間違い

2023/02/25 08:35

投稿

Nefa
Nefa

スコア0

test CHANGED
File without changes
test CHANGED
@@ -35,17 +35,48 @@
35
35
 
36
36
  $get_data = fnc_getData("session", "loginOK");
37
37
 
38
- $strSQL1 = "select cus_points from customer_tbl where cus_id = '$get_data'";
38
+ $strSQL1 = "select cus_id from customer_tbl where cus_id = '$get_data'";
39
+ $strSQL2 = "select pro_id from product_tbl where pro_id = '$get_data'";
40
+ $strSQL3 = "select order_no from order_tbl where order_id = '$get_data'";
41
+ $strSQL4 = "select order_amount from order_tbl where order_id = '$get_data'";
42
+ $strSQL5 = "select buy_date from buy_his_tbl_ where buy_date = '$get_data'";
43
+ $strSQL6 = "select order_price from order_tbl where order_id = '$get_data'";
44
+ $strSQL7 = "select order_address from order_tbl where order_id = '$get_data'";
45
+ $strSQL8 = "select order_class from order_tbl where order_id = '$get_data'";
46
+ $strSQL9 = "select pro_image from product_tbl where product_id = '$get_data'";
47
+
39
- $strSQL2 = "select cus_name from customer_tbl where cus_id = '$get_data'";
48
+ $strSQL10 = "select cus_name from customer_tbl where cus_id = '$get_data'";
40
49
 
41
50
  $db_result1 = mysqli_query($db_link,$strSQL1);
42
51
  $db_result2 = mysqli_query($db_link,$strSQL2);
52
+ $db_result3 = mysqli_query($db_link,$strSQL3);
53
+ $db_result4 = mysqli_query($db_link,$strSQL4);
54
+ $db_result5 = mysqli_query($db_link,$strSQL5);
55
+ $db_result6 = mysqli_query($db_link,$strSQL6);
56
+ $db_result7 = mysqli_query($db_link,$strSQL7);
57
+ $db_result8 = mysqli_query($db_link,$strSQL8);
58
+ $db_result9 = mysqli_query($db_link,$strSQL9);
59
+
60
+ $db_result10 = mysqli_query($db_link,$strSQL10);
61
+
43
62
 
44
63
  $db_row1 = mysqli_fetch_row($db_result1);
45
64
  $db_row2 = mysqli_fetch_row($db_result2);
65
+ $db_row3 = mysqli_fetch_row($db_result3);
66
+ $db_row4 = mysqli_fetch_row($db_result4);
67
+ $db_row5 = mysqli_fetch_row($db_result5);
68
+ $db_row6 = mysqli_fetch_row($db_result6);
69
+ $db_row7 = mysqli_fetch_row($db_result7);
70
+ $db_row8 = mysqli_fetch_row($db_result8);
71
+ $db_row9 = mysqli_fetch_row($db_result9);
72
+
73
+ $db_row10 = mysqli_fetch_row($db_result10);
46
74
 
47
75
 
48
76
  mysqli_close($db_link);
77
+
78
+
79
+
49
80
 
50
81
  ?>
51
82
 
@@ -77,46 +108,50 @@
77
108
  </div>
78
109
  </header>
79
110
 
111
+
112
+
113
+
114
+
80
115
  <main>
81
116
 
82
117
  <div class="title">
83
118
  <h1>マイページ</h1>
84
- <h2>マイページTOP</h2>
119
+ <h2>購入履歴</h2>
85
120
  </div>
86
121
 
87
- <div class="content">
88
122
 
123
+ <div class="purc_his_content">
124
+ <div class="left_image">
125
+ <div class="date"><?php print $db_row5[0] ?></div>
126
+ <img src="<?php print $db_row7[0] ?>">
127
+ </div>
128
+ <table>
89
- <p>
129
+ <tr>
130
+ <th><?php print $db_row1[0] ?></th>
90
- こんにちは、<?php print $db_row2[0] ?>さん<br>
131
+ <td><?php print $db_row2[0] ?> </td>
132
+ <td>商品価格:<span><?php print $db_row6[0] ?>円</span></td>
91
- いつもrerpoをご利用いただきありがとうございます。
133
+ <td>お届け先:<?php print $db_row7[0] ?></td>
92
- </p>
134
+ </tr>
135
+ </table>
136
+ <div class="amount"><?php print $db_row4[0] ?></div>
137
+ </div>
93
138
 
139
+ <div class="purc_his_content">
94
- <div class="btn">
140
+ <div class="left_image">
95
- <div>
96
- <a href="./user_info.php">
97
- <img src="./images/account_fill.png" alt="顧客情報 アイコン">
98
- 顧客情報
99
- </a>
100
- </div>
101
- <div>
102
- <a href="./purc_history.php">
141
+ <div class="date">2022-09-22</div>
103
- <img src="./images/cart_fill.png" alt="購入履歴 アイコン">
104
- 購入履歴
105
- </a>
106
- </div>
107
- <div>
108
- <a href="./likes.php">
142
+ <img src="./images/chair1.jpg">
109
- <img src="./images/like_fill.png" alt="お気に入り アイコン">
110
- お気に入り
111
- </a>
112
- </div>
113
143
  </div>
114
-
144
+ <table>
115
- <p>
145
+ <tr>
116
- ポイント数: <?php print $db_row1[0] ?> イン
146
+ <th>AREA グチェア(BLACK)</th>
147
+ <td>AREA ダイニングチェア (BLACK) ZK-10442 リサイクル素材構成 木目調 </td>
148
+ <td>商品価格:<span>円</span></td>
149
+ <td>お届け先:〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇 99-99-99</td>
117
- </p>
150
+ </tr>
118
-
151
+ </table>
152
+ <div class="amount">数量 1</div>
119
153
  </div>
154
+
120
155
 
121
156
  </main>
122
157