質問編集履歴

6

追記

2016/06/20 06:05

投稿

earnest_gay
earnest_gay

スコア615

test CHANGED
File without changes
test CHANGED
@@ -406,4 +406,4 @@
406
406
 
407
407
  15:02追記
408
408
 
409
- ![イ![イメージ説明](b0fe3f866b767e21fddba5187012ac62.jpeg)(d3aa2bcab0faa365263e201e93023de6.jpeg)
409
+ ![イメージ説明](73cd1bc7057730bbfd9572d82785bd2a.jpeg)

5

具体化

2016/06/20 06:05

投稿

earnest_gay
earnest_gay

スコア615

test CHANGED
File without changes
test CHANGED
@@ -397,3 +397,13 @@
397
397
  テーブル構造です。
398
398
 
399
399
  ![イメージ説明](d7b0267cad8630295ba1d949f49ce57a.png)
400
+
401
+
402
+
403
+ ---
404
+
405
+
406
+
407
+ 15:02追記
408
+
409
+ ![イ![イメージ説明](b0fe3f866b767e21fddba5187012ac62.jpeg)(d3aa2bcab0faa365263e201e93023de6.jpeg)

4

追記

2016/06/20 06:04

投稿

earnest_gay
earnest_gay

スコア615

test CHANGED
File without changes
test CHANGED
@@ -391,3 +391,9 @@
391
391
  ```
392
392
 
393
393
  Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'email' cannot be null' in C:\xampp\htdocs\xxx\register_human_thanks.php:34 Stack trace: #0 C:\xampp\htdocs\xxx\register_human_thanks.php(34): PDOStatement->execute(Array) #1 {main} thrown in C:\xampp\htdocs\xxx\register_human_thanks.php on line 34
394
+
395
+
396
+
397
+ テーブル構造です。
398
+
399
+ ![イメージ説明](d7b0267cad8630295ba1d949f49ce57a.png)

3

追記

2016/06/20 05:39

投稿

earnest_gay
earnest_gay

スコア615

test CHANGED
File without changes
test CHANGED
@@ -347,3 +347,47 @@
347
347
 
348
348
 
349
349
  **Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1' in C:\xampp\htdocs\xxx\register_human_thanks.php:34 Stack trace: #0 C:\xampp\htdocs\IDH\register_human_thanks.php(34): PDOStatement->execute(Array) #1 {main} thrown in C:\xampp\htdocs\xxx\register_human_thanks.php on line 34**
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+ ---
366
+
367
+ 14:36 追記
368
+
369
+ カラム名を指定してみると、エラーの結果が若干変わりました。
370
+
371
+ ```ここに言語を入力
372
+
373
+ $stmt = $pdo->prepare("INSERT INTO user_data VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
374
+
375
+ ```
376
+
377
+ Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1' in C:\xampp\htdocs\xxx\register_human_thanks.php:34 Stack trace: #0 C:\xampp\htdocs\xxx\register_human_thanks.php(34): PDOStatement->execute(Array) #1 {main} thrown in C:\xampp\htdocs\xxx\register_human_thanks.php on line 34
378
+
379
+
380
+
381
+
382
+
383
+ ---
384
+
385
+
386
+
387
+ ```ここに言語を入力
388
+
389
+ $stmt = $pdo->prepare("INSERT INTO user_data(email, password, fname_kanji, lname_kanji, fname_kana, lname_kana, fname_roma, lname_roma, middle_name, birthday_year, birthday_month, birthday_day, gender, first_post, last_post, prefectures, city, town, building, tel1, tel2, tel3) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
390
+
391
+ ```
392
+
393
+ Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'email' cannot be null' in C:\xampp\htdocs\xxx\register_human_thanks.php:34 Stack trace: #0 C:\xampp\htdocs\xxx\register_human_thanks.php(34): PDOStatement->execute(Array) #1 {main} thrown in C:\xampp\htdocs\xxx\register_human_thanks.php on line 34

2

追記

2016/06/20 05:36

投稿

earnest_gay
earnest_gay

スコア615

test CHANGED
File without changes
test CHANGED
@@ -343,3 +343,7 @@
343
343
  $_SEESION['join1']['tel3']
344
344
 
345
345
  の部分です。
346
+
347
+
348
+
349
+ **Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1' in C:\xampp\htdocs\xxx\register_human_thanks.php:34 Stack trace: #0 C:\xampp\htdocs\IDH\register_human_thanks.php(34): PDOStatement->execute(Array) #1 {main} thrown in C:\xampp\htdocs\xxx\register_human_thanks.php on line 34**

1

追記

2016/06/20 05:15

投稿

earnest_gay
earnest_gay

スコア615

test CHANGED
File without changes
test CHANGED
@@ -269,3 +269,77 @@
269
269
  ?>
270
270
 
271
271
  ```
272
+
273
+
274
+
275
+
276
+
277
+ 6/20 14:11追記
278
+
279
+
280
+
281
+ プレースホルダーの数を修正し、user_data()の()を取り除いても一向にエラーが収まりません...
282
+
283
+
284
+
285
+ ```ここに言語を入力
286
+
287
+ $stmt = $pdo->prepare("INSERT INTO user_data VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");//基本項目22個
288
+
289
+ $stmt->execute([
290
+
291
+ $_SEESION['join1']['email'],
292
+
293
+ password_hash($_SEESION['join1']['pw'],PASSWORD_DEFAULT),
294
+
295
+ $_SEESION['join1']['name1'],
296
+
297
+ $_SEESION['join1']['name2'],
298
+
299
+ $_SEESION['join1']['name3'],
300
+
301
+ $_SEESION['join1']['name4'],
302
+
303
+ $_SEESION['join1']['name5'],
304
+
305
+ $_SEESION['join1']['name6'],
306
+
307
+ $_SEESION['join1']['name7'],
308
+
309
+ $_SEESION['join1']['year'],
310
+
311
+ $_SEESION['join1']['month'],
312
+
313
+ $_SEESION['join1']['day'],
314
+
315
+ $_SEESION['join1']['gender'],
316
+
317
+ $_SEESION['join1']['first_post'],
318
+
319
+ $_SEESION['join1']['last_post'],
320
+
321
+ $_SEESION['join1']['pref'],
322
+
323
+ $_SEESION['join1']['city'],
324
+
325
+ $_SEESION['join1']['town'],
326
+
327
+ $_SEESION['join1']['building'],
328
+
329
+ $_SEESION['join1']['tel1'],
330
+
331
+ $_SEESION['join1']['tel2'],
332
+
333
+ $_SEESION['join1']['tel3']
334
+
335
+ ]);
336
+
337
+ ```
338
+
339
+
340
+
341
+ 同じ34行目で
342
+
343
+ $_SEESION['join1']['tel3']
344
+
345
+ の部分です。