1 # void pq\Statement::__construct(pq\Connection $conn, string $name, string $query[, array $types = NULL[, bool $async = FALSE]])
3 Prepare a new statement.
4 See pq\Connection::prepare().
9 The connection to prepare the statement on.
11 The name identifying this statement.
13 The actual query to prepare.
14 * Optional array $types = NULL
15 A list of corresponding query parameter type OIDs.
16 * Optional bool $async = FALSE
17 Whether to prepare the statement [asynchronously](pq/Connection/: Asynchronous Usage).
21 * pq\Exception\InvalidArgumentException
22 * pq\Exception\BadMethodCallException
23 * pq\Exception\RuntimeException
24 * pq\Exception\DomainException
30 $connection = new pq\Connection;
31 $statement = new pq\Statement(
38 $result = $statement->exec([123]);
39 $result->fetchCol($col);