質問編集履歴
3
ヒアドキュメント追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -144,7 +144,8 @@
|
|
144
144
|
require_once __DIR__ . '/mysqli.php';
|
145
145
|
$db = dbConnect();
|
146
146
|
$sql = <<<EOT
|
147
|
-
UPDATE posts SET title = ?, live_type = ?, house_url = ?, questionnaire_1 = ?,recommend_body = ?, updated_at = NOW() WHERE id = ?
|
147
|
+
UPDATE posts SET title = ?, live_type = ?, house_url = ?, questionnaire_1 = ?,recommend_body = ?, updated_at = NOW() WHERE id = ?
|
148
|
+
EOT;
|
148
149
|
$stmt = $db->prepare($sql);
|
149
150
|
$id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT);
|
150
151
|
$title = $_POST['title'];
|
2
構文間違い
test
CHANGED
File without changes
|
test
CHANGED
@@ -161,6 +161,7 @@
|
|
161
161
|
$questionnaire_1,
|
162
162
|
$recommend_body,
|
163
163
|
);
|
164
|
+
$success = $stmt->execute();
|
164
165
|
```
|
165
166
|
|
166
167
|
#試したこと
|
1
文字の変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
【PH
|
1
|
+
【PHP】mysqliを使用しての投稿の更新ができない
|
test
CHANGED
File without changes
|