PDO 遇到个奇怪的问题
程序员文章站
2022-06-11 13:53:27
...
问题写在图上了
回复讨论(解决方案)
执行这面的语句成功
$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