search

Home  >  Q&A  >  body text

$pdo->exec($sql);Why does it always return false?

$pdo = new PDO($dsn,$username,$password);

var_dump($pdo);//The output is object(PDO)#1 (0) { }


//Execute the insert statement

$sql = "update text set age=age 1 where id=5";

$records = $pdo ->exec($sql);

var_dump($records);

我正在输入...我正在输入...1788 days ago1028

reply all(0)I'll reply

No reply
  • Cancelreply