- Db\SoloConnection
class Db \ SoloConnection
- All implemented interfaces:
- Serializable, Connection
Represents an instance of a single database connection.
Method Summary
Name | Description |
---|---|
__construct($database, $username, $password, $host = "localhost", $port = 3306, $timezone = false) | |
getDSN() | |
getPDO() | |
lastInsertId() | |
prepare($query) | |
serialize() | We implement Serializable so that this can be used in a serialized exception argument. |
unserialize($ser) |
public function __construct($database, $username, $password, $host = "localhost", $port = 3306, $timezone = false)
- Defaults:
host
="localhost"
port
= 3306timezone
=false
public function getDSN()
public function getPDO()
public function lastInsertId()
- Returns:
the last inserted auto_increment id, if there is any
public function prepare($query)
- Returns:
a Query ready to be used
public function serialize()
We implement Serializable so that this can be used in a serialized exception argument.
public function unserialize($ser)
- Throws:
Exception - since unserialize() is not supported on this object