diff options
Diffstat (limited to 'ext/pgsql/tests/result.inc')
| -rw-r--r-- | ext/pgsql/tests/result.inc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/pgsql/tests/result.inc b/ext/pgsql/tests/result.inc new file mode 100644 index 0000000000..6982a84493 --- /dev/null +++ b/ext/pgsql/tests/result.inc @@ -0,0 +1,21 @@ +<?php +error_reporting(E_ALL); + +include 'config.inc'; + +$db = pg_connect($conn_str); + +$sql = "SELECT * FROM $table_name"; +$result = pg_query($db, $sql) or die('Cannot qeury db'); +$rows = pg_num_rows($result); + +$rec = pg_fetch_object($result, 1); +var_dump($rec); +$rec = pg_fetch_array($result, 1); +var_dump($rec); +$rec = pg_fetch_row($result, 1); +var_dump($rec); + +echo "Ok\n"; + +?>
\ No newline at end of file |
