xref: /PHP-5.3/ext/sqlite/tests/sqlite_oo_027.phpt (revision 610c7fbe)
1--TEST--
2sqlite-oo: changes
3--INI--
4sqlite.assoc_case=0
5--SKIPIF--
6<?php # vim:ft=php
7if (!extension_loaded("sqlite")) print "skip";
8?>
9--FILE--
10<?php
11include "blankdb_oo.inc";
12
13$data = array("one", "two", "three");
14
15$db->query("CREATE TABLE strings(a VARCHAR)");
16
17foreach ($data as $str) {
18	$db->query("INSERT INTO strings VALUES('$str')");
19	echo $db->changes() . "\n";
20}
21
22$db->query("UPDATE strings SET a='foo' WHERE a!='two'");
23echo $db->changes() . "\n";
24
25$db->query("DELETE FROM strings WHERE 1");
26echo $db->changes() . "\n";
27
28$str = '';
29foreach ($data as $s) {
30	$str .= "INSERT INTO strings VALUES('".$s."');";
31}
32$db->query($str);
33echo $db->changes() . "\n";
34
35?>
36--EXPECT--
371
381
391
402
413
423
43