PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/pgsql/tests/17result.phpt ('PostgreSQL pg_fetch_*() functions')

Script

1: <?php
2: error_reporting
(E_ALL);
3:
4: include 
'config.inc';
5:
6:
$db pg_connect($conn_str);
7:
8:
$sql "SELECT * FROM $table_name";
9:
$result pg_query($db$sql) or die('Cannot qeury db');
10:
$rows pg_num_rows($result);
11:
12:
var_dump(pg_result_seek($result1));
13:
var_dump(pg_fetch_object($result));
14:
var_dump(pg_fetch_array($result1));
15:
var_dump(pg_fetch_row($result1));
16:
var_dump(pg_fetch_assoc($result1));
17:
var_dump(pg_result_seek($result0));
18:
19: echo 
"Ok\n";
20:
?>
21:

Expected

bool(true)
object(stdClass)#1 (3) {
  ["num"]=>
  string(1) "1"
  ["str"]=>
  string(3) "ABC"
  ["bin"]=>
  NULL
}
array(6) {
  [0]=>
  string(1) "1"
  ["num"]=>
  string(1) "1"
  [1]=>
  string(3) "ABC"
  ["str"]=>
  string(3) "ABC"
  [2]=>
  NULL
  ["bin"]=>
  NULL
}
array(3) {
  [0]=>
  string(1) "1"
  [1]=>
  string(3) "ABC"
  [2]=>
  NULL
}
array(3) {
  ["num"]=>
  string(1) "1"
  ["str"]=>
  string(3) "ABC"
  ["bin"]=>
  NULL
}
bool(true)
Ok

Output

bool(true)
object(stdClass)#1 (3) {
  ["num"]=>
  string(1) "0"
  ["str"]=>
  string(3) "ABC"
  ["bin"]=>
  NULL
}
array(6) {
  [0]=>
  string(1) "0"
  ["num"]=>
  string(1) "0"
  [1]=>
  string(3) "ABC"
  ["str"]=>
  string(3) "ABC"
  [2]=>
  NULL
  ["bin"]=>
  NULL
}
array(3) {
  [0]=>
  string(1) "0"
  [1]=>
  string(3) "ABC"
  [2]=>
  NULL
}
array(3) {
  ["num"]=>
  string(1) "0"
  ["str"]=>
  string(3) "ABC"
  ["bin"]=>
  NULL
}
bool(true)
Ok

Diff

004+   string(1) "0"
004-   string(1) "1"
012+   string(1) "0"
012-   string(1) "1"
014+   string(1) "0"
014-   string(1) "1"
026+   string(1) "0"
026-   string(1) "1"
034+   string(1) "0"
034-   string(1) "1"

 

Generated at Tue, 22 Jul 2014 01:33:26 +0000 (9 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.