blog-app/core/database/QueryBuilder.php

26 lines
353 B
PHP
Raw Permalink Normal View History

2021-09-16 20:27:51 +08:00
<?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();
}
}