~ubuntu-branches/ubuntu/quantal/php5/quantal

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Sean Finney
  • Date: 2009-07-01 09:12:10 UTC
  • mto: (0.9.1) (1.1.17 upstream)
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: james.westby@ubuntu.com-20090701091210-go0h6506p62on17r
Tags: upstream-5.3.0
ImportĀ upstreamĀ versionĀ 5.3.0

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
}