2
Sybase-CT sybase_fetch_object
9
/* This file is part of PHP test framework for ext/sybase_ct
11
* $Id: test_fetch_object.phpt,v 1.1 2004/07/11 16:10:03 thekid Exp $
20
// {{{ resource fetch_object(resource db, [mixed arg= NULL])
21
// Fetches a resultset and returns it as an object
22
function fetch_object($db, $arg= NULL) {
23
return sybase_fetch_object(sybase_query('select
27
getdate() as "lastchange"
32
$db= sybase_connect_ex();
35
var_export(fetch_object($db)); echo "\n";
37
// Test with userland class
38
var_export(fetch_object($db, 'article')); echo "\n";
41
var_export(fetch_object($db, new article())); echo "\n";
43
// Test with non-existant class
44
var_export(fetch_object($db, '***')); echo "\n";
51
%s $caption = 'Hello';
53
%s $lastchange = '%s';
57
%s $caption = 'Hello';
59
%s $lastchange = '%s';
63
%s $caption = 'Hello';
65
%s $lastchange = '%s';
68
Notice: sybase_fetch_object(): Sybase: Class *** has not been declared in %s/test_fetch_object.php on line %d
71
%s $caption = 'Hello';
73
%s $lastchange = '%s';