projects
/
mdref
/
mdref-pq
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
3efe3ef
)
add example
author
Michael Wallner
<mike@php.net>
Thu, 25 Sep 2014 11:57:14 +0000
(13:57 +0200)
committer
Michael Wallner
<mike@php.net>
Thu, 25 Sep 2014 11:57:14 +0000
(13:57 +0200)
pq/Result/desc.md
patch
|
blob
|
history
diff --git
a/pq/Result/desc.md
b/pq/Result/desc.md
index d73363f0c9f1ec9cbe5cbefb1e76fe5453ebcf67..3aa81b214a669f5456ad4d38ae92a7718b0bb32d 100644
(file)
--- a/
pq/Result/desc.md
+++ b/
pq/Result/desc.md
@@
-16,3
+16,21
@@
None.
## Throws:
* pq\Exception\BadMethodCallException
+
+
+## Example:
+
+ <?php
+
+ $connection = new pq\Connection;
+ $types = new pq\Types($connection);
+ $statement = $connection->prepare("test1", "SELECT NOW() - \$1");
+ $description = $statement->desc();
+
+ printf("%s\n", $types[$description[0]]->typname);
+
+ ?>
+
+Yields:
+
+ timestamptz