質問編集履歴

1

誤記訂正

2021/02/14 13:16

投稿

sat0
sat0

スコア2

test CHANGED
File without changes
test CHANGED
@@ -28,19 +28,17 @@
28
28
 
29
29
  $_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
30
30
 
31
+ $stmt = $_db->query("SELECT * FROM prefectures ORDER BY id ASC");
32
+
33
+ $prefectures = $stmt->fetchAll(PDO::FETCH_ASSOC);
34
+
31
35
  } catch(PDOException $e){
32
36
 
33
37
  echo $e->getMessage();
34
38
 
35
39
  exit;
36
40
 
37
- }
41
+ }
38
-
39
-
40
-
41
- $stmt = $_db->query("SELECT * FROM prefectures ORDER BY id ASC");
42
-
43
- $prefectures = $stmt->fetchAll(PDO::FETCH_ASSOC);
44
42
 
45
43
 
46
44