Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sybase_fetch_object(3) [php man page]

SYBASE_FETCH_OBJECT(3)													    SYBASE_FETCH_OBJECT(3)

sybase_fetch_object - Fetch a row as an object

SYNOPSIS
object sybase_fetch_object (resource $result, [mixed $object]) DESCRIPTION
sybase_fetch_object(3) is similar to sybase_fetch_assoc(3), with one difference - an object is returned, instead of an array. Speed-wise, the function is identical to sybase_fetch_array(3), and almost as quick as sybase_fetch_row(3) (the difference is insignifi- cant). PARAMETERS
o $result - o $object - Use the second $object to specify the type of object you want to return. If this parameter is omitted, the object will be of type stdClass. RETURN VALUES
Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows. EXAMPLES
Example #1 sybase_fetch_object(3) return as Foo <?php class Foo { var $foo, $bar, $baz; } // {...] $qrh= sybase_query('SELECT foo, bar, baz FROM example'); $foo= sybase_fetch_object($qrh, 'Foo'); $bar= sybase_fetch_object($qrh, new Foo()); // {...] ?> SEE ALSO
sybase_fetch_array(3), sybase_fetch_row(3). PHP Documentation Group SYBASE_FETCH_OBJECT(3)

Check Out this Related Man Page

SYBASE_FETCH_ASSOC(3)													     SYBASE_FETCH_ASSOC(3)

sybase_fetch_assoc - Fetch a result row as an associative array

SYNOPSIS
array sybase_fetch_assoc (resource $result) DESCRIPTION
sybase_fetch_assoc(3) is a version of sybase_fetch_row(3) that uses column names instead of integers for indices in the result array. Col- umns from different tables with the same names are returned as name, name1, name2, ..., nameN. An important thing to note is that using sybase_fetch_assoc(3) is NOT significantly slower than using sybase_fetch_row(3), while it pro- vides a significant added value. PARAMETERS
o $result - RETURN VALUES
Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. NOTES
Note This function is only available when using the CT library interface to Sybase, and not with the DB library. SEE ALSO
sybase_fetch_row(3), sybase_fetch_array(3), sybase_fetch_object(3). PHP Documentation Group SYBASE_FETCH_ASSOC(3)
Man Page