fix docs, add missing "}", fix formatting
[mdref/mdref-pq] / pq / Result / desc.md
1 # array pq\Result::desc()
2
3 Describe a prepared statement.
4
5 > ***NOTE:***
6 This will only return meaningful information for a result of pq\Statement::desc().
7
8 ## Params:
9
10 None.
11
12 ## Returns:
13
14 * array, list of parameter type OIDs for the prepared statement.
15
16 ## Throws:
17
18 * pq\Exception\InvalidArgumentException
19 * pq\Exception\BadMethodCallException
20
21 ## Example:
22
23 <?php
24
25 $connection = new pq\Connection;
26 $types = new pq\Types($connection);
27 $statement = $connection->prepare("test1", "SELECT NOW() - \$1");
28 $description = $statement->desc();
29
30 printf("%s\n", $types[$description[0]]->typname);
31
32 ?>
33
34 Yields:
35
36 timestamptz