blog-app/core/database/QueryBuilder.php
2021-11-13 14:19:55 +08:00

26 lines
353 B
PHP

<?php
namespace Core\Database;
use \PDO;
class QueryBuilder
{
protected $pdo;
public function __construct(PDO $pdo)
{
$this->pdo = $pdo;
}
public function prepare($query)
{
return $this->pdo->prepare($query);
}
public function lastInsertId()
{
return $this->pdo->lastInsertId();
}
}