teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

改善

2016/09/06 02:09

投稿

a-_.
a-_.

スコア133

title CHANGED
File without changes
body CHANGED
File without changes

1

改善

2016/09/06 02:09

投稿

a-_.
a-_.

スコア133

title CHANGED
File without changes
body CHANGED
@@ -4,8 +4,8 @@
4
4
  ですが、下記エラー文が表示され、降順のコードがおかしいと指摘されます
5
5
  arsortってどのように定義してコードを書けばいいのでしょう
6
6
  Warning: arsort() expects parameter 1 to be array, string given in C:\~XXX.php on line 22
7
-
7
+ (名前)
8
- &date
8
+ (内容) &date
9
9
 
10
10
  あと、日付と時刻のdate(デート)はdata(データ)じゃなくていいんでしょうか
11
11
  また、$dateは既にtimestampとしてデータベースにテーブルを作成してるんですが、今のコードで取得できてるんでしょうか
@@ -47,7 +47,7 @@
47
47
  die('Connect Error: ' . $e->getCode());
48
48
  }
49
49
 
50
- $sql = 'INSERT INTO kadai1 (name, comment) VALUES (?, ?, CURDATE())';
50
+ $sql = 'INSERT INTO XXX (name, comment) VALUES (?, ?, CURDATE())';
51
51
  $sth = $dbh->prepare($sql);
52
52
  $sth->bindvalue(1, $_POST['comment'], PDO::PARAM_STR);
53
53
  $sth->bindvalue(2, $_POST['name'], PDO::PARAM_INT);