Annotation of embedaddon/php/ext/interbase/tests/ibase_num_params_001.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: ibase_num_params(): Basic test
3: --SKIPIF--
4: <?php include("skipif.inc"); ?>
5: --FILE--
6: <?php
7:
8: require("interbase.inc");
9:
10: $x = ibase_connect($test_base);
11:
12: $rs = ibase_prepare('SELECT * FROM test1 WHERE 1 = ? AND 2 = ?');
13: var_dump(ibase_num_params($rs));
14:
15: $rs = ibase_prepare('SELECT * FROM test1 WHERE 1 = ? AND 2 = ?');
16: var_dump(ibase_num_params());
17:
18: $rs = ibase_prepare('SELECT * FROM test1 WHERE 1 = ? AND 2 = ? AND 3 = :x');
19: var_dump(ibase_num_params($rs));
20:
21:
22: ?>
23: --EXPECTF--
24: int(2)
25:
26: Warning: ibase_num_params() expects exactly 1 parameter, 0 given in %s on line %d
27: NULL
28:
29: Warning: ibase_prepare(): Dynamic SQL Error SQL error code = -206 %s in %s on line %d
30:
31: Warning: ibase_num_params() expects parameter 1 to be resource, boolean given in %s on line %d
32: NULL
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>