You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
614 B

23 years ago
  1. --TEST--
  2. PostgreSQL pg_select()
  3. --SKIPIF--
  4. <?php include("skipif.inc"); ?>
  5. --FILE--
  6. <?php
  7. error_reporting(E_ALL);
  8. include 'config.inc';
  9. $db = pg_connect($conn_str);
  10. $fields = array('num'=>'1234', 'str'=>'ABC', 'bin'=>'XYZ');
  11. $ids = array('num'=>'1234');
  12. $res = pg_select($db, $table_name, $ids) or print "Error\n";
  13. var_dump($res);
  14. echo pg_select($db, $table_name, $ids, PGSQL_DML_STRING)."\n";
  15. echo "Ok\n";
  16. ?>
  17. --EXPECT--
  18. array(1) {
  19. [0]=>
  20. array(3) {
  21. ["num"]=>
  22. string(4) "1234"
  23. ["str"]=>
  24. string(3) "AAA"
  25. ["bin"]=>
  26. string(3) "BBB"
  27. }
  28. }
  29. SELECT * FROM php_pgsql_test WHERE num=1234;
  30. Ok