質問編集履歴
1
画像をコードに変更しました。 CREATE INSERT文追記しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,20 +4,118 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
|
7
|
-
やってみたことはhttps://qiita.com/guzuri/items/643c1311224e8d482278
|
7
|
+
やってみたことは[https://qiita.com/guzuri/items/643c1311224e8d482278]
|
8
8
|
|
9
9
|
に記載されている手順でmy.ini php.iniを編集しました。
|
10
10
|
|
11
11
|
|
12
12
|
|
13
|
+
結果はうまくいきませんでした
|
14
|
+
|
15
|
+
```SQL
|
16
|
+
|
17
|
+
コード
|
18
|
+
|
19
|
+
MariaDB [nyuumon]> SELECT * FROM tbl_employee;
|
20
|
+
|
21
|
+
+------+----------+------------+----------+-----------+---------+
|
22
|
+
|
23
|
+
| code | name | birthday | dpt_code | post_code | manager |
|
24
|
+
|
25
|
+
+------+----------+------------+----------+-----------+---------+
|
26
|
+
|
27
|
+
| 101 | ???リ・?Y | 1972-02-01 | 10 | 3 | NULL |
|
28
|
+
|
29
|
+
| 102 | ?????h?? | 1974-09-09 | 20 | 4 | 101 |
|
30
|
+
|
31
|
+
| 103 | ?R?c?ヤ子 | 1976-05-21 | 10 | 4 | 101 |
|
32
|
+
|
13
|
-
|
33
|
+
| 104 | ?c???B?? | 1978-12-04 | 30 | NULL | 102 |
|
34
|
+
|
35
|
+
| 105 | ?????a?q | 1980-07-14 | 30 | NULL | 103 |
|
36
|
+
|
37
|
+
+------+----------+------------+----------+-----------+---------+
|
38
|
+
|
39
|
+
```
|
40
|
+
|
41
|
+
chrasetの変更は出来ました
|
42
|
+
|
43
|
+
```SQL
|
44
|
+
|
45
|
+
コード
|
46
|
+
|
47
|
+
MariaDB [nyuumon]> SHOW VARIABLES LIKE "chara%";
|
48
|
+
|
49
|
+
+--------------------------+--------------------------------+
|
50
|
+
|
51
|
+
| Variable_name | Value |
|
52
|
+
|
53
|
+
+--------------------------+--------------------------------+
|
54
|
+
|
55
|
+
| character_set_client | utf8 |
|
56
|
+
|
57
|
+
| character_set_connection | utf8 |
|
58
|
+
|
59
|
+
| character_set_database | utf8 |
|
60
|
+
|
61
|
+
| character_set_filesystem | binary |
|
62
|
+
|
63
|
+
| character_set_results | utf8 |
|
64
|
+
|
65
|
+
| character_set_server | utf8 |
|
66
|
+
|
67
|
+
| character_set_system | utf8 |
|
68
|
+
|
69
|
+
| character_sets_dir | C:\xampp\mysql\share\charsets\ |
|
70
|
+
|
71
|
+
+--------------------------+--------------------------------+```
|
14
72
|
|
15
73
|
|
16
74
|
|
17
|
-
|
75
|
+
|
18
76
|
|
19
77
|
|
20
78
|
|
21
79
|
他に何が悪いのかわからないのでご教授下さいますと幸いです。
|
22
80
|
|
23
81
|
よろしくお願いいたします。
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
```SQL
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
create table tbl_employee (
|
90
|
+
|
91
|
+
code INTEGER NOT NULL PRIMARY KEY,
|
92
|
+
|
93
|
+
name VARCHAR(40),
|
94
|
+
|
95
|
+
birthday DATE,
|
96
|
+
|
97
|
+
dpt_code INTEGER NOT NULL,
|
98
|
+
|
99
|
+
post_code INTEGER,
|
100
|
+
|
101
|
+
manager INTEGER,
|
102
|
+
|
103
|
+
FOREIGN KEY(dpt_code) REFERENCES tbl_department(code),
|
104
|
+
|
105
|
+
FOREIGN KEY(post_code) REFERENCES tbl_post(code)
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
insert into tbl_employee values (101,'鈴木一郎','1972-02-01',10,3,NULL);
|
110
|
+
|
111
|
+
insert into tbl_employee values (102,'佐藤栄作','1974-09-09',20,4,101);
|
112
|
+
|
113
|
+
insert into tbl_employee values (103,'山田花子','1976-05-21',10,4,101);
|
114
|
+
|
115
|
+
insert into tbl_employee values (104,'田中達也','1978-12-04',30,NULL,102);
|
116
|
+
|
117
|
+
insert into tbl_employee values (105,'高橋和子','1980-07-14',30,NULL,103);
|
118
|
+
|
119
|
+
);
|
120
|
+
|
121
|
+
```
|