MySQL
in package
implements
IDatabase
Interfaces, Classes, Traits and Enums
Table of Contents
- $conn : PDO
- PDO database connection
- $settings : SettingsInterface
- __construct() : mixed
- connect() : void
- connects instance to database
- lastInsertId() : int
- returns id of last inserted row
- query() : array<string|int, mixed>
- implements logic to query database
Properties
$conn
PDO database connection
private
PDO
$conn
$settings
private
SettingsInterface
$settings
Methods
__construct()
public
__construct(SettingsInterface $settings) : mixed
Parameters
- $settings : SettingsInterface
Return values
mixed —connect()
connects instance to database
public
connect() : void
Return values
void —lastInsertId()
returns id of last inserted row
public
lastInsertId() : int
Return values
int —query()
implements logic to query database
public
query(string $sql[, array<string|int, mixed> $params = [] ]) : array<string|int, mixed>
Parameters
- $sql : string
- $params : array<string|int, mixed> = []