insert操作,我这里返回序列化的插入语句,没有返回id值,求解,怎么返回插入id
新版本文档中这样返回ID:
$database->insert("account", [ "user_name" => "foo", "email" => "foo@bar.com", "age" => 25 ]); $account_id = $database->id();
vendor\catfan\medoo\src\Medoo.php
312行
修改为 return $this->pdo->lastInsertId();
PDO::lastInsertId — 返回最后插入行的ID或序列值 string PDO::lastInsertId ([ string $name = NULL ] )