~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to ext/sqlite/tests/sqlite_oo_002.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
sqlite-oo: Simple insert/select
 
3
--INI--
 
4
sqlite.assoc_case=0
 
5
--SKIPIF--
 
6
<?php # vim:ft=php
 
7
if (!extension_loaded("sqlite")) print "skip"; ?>
 
8
--FILE--
 
9
<?php 
 
10
require_once('blankdb_oo.inc');
 
11
var_dump($db);
 
12
 
 
13
var_dump($db->query("CREATE TABLE foo(c1 date, c2 time, c3 varchar(64))"));
 
14
var_dump($db->query("INSERT INTO foo VALUES ('2002-01-02', '12:49:00', NULL)"));
 
15
$r = $db->query("SELECT * from foo");
 
16
var_dump($r);
 
17
var_dump($r->fetch());
 
18
?>
 
19
--EXPECTF--
 
20
object(SQLiteDatabase)#%d (0) {
 
21
}
 
22
object(SQLiteResult)#%d (0) {
 
23
}
 
24
object(SQLiteResult)#%d (0) {
 
25
}
 
26
object(SQLiteResult)#%d (0) {
 
27
}
 
28
array(6) {
 
29
  [0]=>
 
30
  string(10) "2002-01-02"
 
31
  ["c1"]=>
 
32
  string(10) "2002-01-02"
 
33
  [1]=>
 
34
  string(8) "12:49:00"
 
35
  ["c2"]=>
 
36
  string(8) "12:49:00"
 
37
  [2]=>
 
38
  NULL
 
39
  ["c3"]=>
 
40
  NULL
 
41
}