We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2181129 commit a9ab01fCopy full SHA for a9ab01f
1 file changed
ext/pgsql/tests/33query_params_bool.phpt
@@ -0,0 +1,28 @@
1
+--TEST--
2
+PostgreSQL prepared queries with bool constants
3
+--SKIPIF--
4
+<?php
5
+include("skipif.inc");
6
+if (!function_exists('pg_prepare')) die('skip function pg_prepare() does not exist');
7
+?>
8
+--FILE--
9
10
+
11
+include('config.inc');
12
13
+$db = pg_connect($conn_str);
14
15
+$version = pg_version($db);
16
+if ($version['protocol'] >= 3) {
17
+ $result = pg_query_params($db, "SELECT * FROM ".$table_name." WHERE num >= $1;", array(true));
18
+ // bug occurs with false as it turns out as empty.
19
+ $result = pg_query_params($db, "SELECT * FROM ".$table_name." WHERE num <> $1;", array(false));
20
+ pg_free_result($result);
21
+}
22
+pg_close($db);
23
24
+echo "OK";
25
26
+--EXPECT--
27
+OK
28
0 commit comments