1--TEST--
2ibase_affected_rows(): Basic test
3--SKIPIF--
4<?php include("skipif.inc"); ?>
5--FILE--
6<?php
7
8require("interbase.inc");
9
10$x = ibase_connect($test_base);
11
12ibase_query($x, 'INSERT INTO test1 VALUES (1, 100)');
13ibase_query($x, 'INSERT INTO test1 VALUES (10000, 100)');
14
15ibase_query($x, 'UPDATE test1 SET i = 10000');
16var_dump(ibase_affected_rows($x));
17
18
19ibase_query($x, 'UPDATE test1 SET i = 10000 WHERE i = 2.0');
20var_dump(ibase_affected_rows($x));
21
22ibase_query($x, 'UPDATE test1 SET i =');
23var_dump(ibase_affected_rows($x));
24
25
26?>
27--EXPECTF--
28int(3)
29int(0)
30
31Warning: ibase_query(): Dynamic SQL Error SQL error code = -104 %s on line %d
32int(0)
33