问题写在图上了
执行这面的语句成功
$stmt3=$pdo->prepare("insert into site (sitename) values (:sitename)");
$stmt3->execute(array(":sitename"=>"asdjasd"));
执行下面的语句失败
$stmt3=$pdo->prepare("insert into site (sitename, keyword, describe) values (:sitename, :keyword, :describe)");
$stmt3->execute(array(":sitename"=>"asdjasd",":keyword"=>"apple",":describe"=>"dassdadadasadads"));
求解~
你把错误打印出来不久可以知道了么?
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in D:\xampp\htdocs\test.php on line 28