Home > Backend Development > PHP Tutorial > PDO 遇到个奇怪的问题

PDO 遇到个奇怪的问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-23 13:53:32
Original
923 people have browsed it

问题写在图上了


回复讨论(解决方案)

执行这面的语句成功
$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

Related labels:
pdo
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Database pdo connection problem
From 1970-01-01 08:00:00
0
0
0
pdo installation
From 1970-01-01 08:00:00
0
0
0
$pdo->exec($sql);Why does it always return false?
From 1970-01-01 08:00:00
0
0
0
PHP PDO predefined constants
From 1970-01-01 08:00:00
0
0
0
PDO query data error
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template