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

FBSQL_FETCH_OBJECT(3)							 1						     FBSQL_FETCH_OBJECT(3)

fbsql_fetch_object - Fetch a result row as an object

SYNOPSIS
object fbsql_fetch_object (resource $result) DESCRIPTION
fbsql_fetch_object(3) is similar to fbsql_fetch_array(3), with one difference - an object is returned, instead of an array. Indirectly, that means that you can only access the data by the field names, and not by their offsets (numbers are illegal property names). Speed-wise, the function is identical to fbsql_fetch_array(3), and almost as quick as fbsql_fetch_row(3) (the difference is insignifi- cant). PARAMETERS
o $ result -A result identifier returned by fbsql_query(3) or fbsql_db_query(3). RETURN VALUES
Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows. EXAMPLES
Example #1 fbsql_fetch_object(3) example <?php fbsql_connect($host, $user, $password); $result = fbsql_db_query("database", "select * from table"); while ($row = fbsql_fetch_object($result)) { echo $row->user_id; echo $row->fullname; } fbsql_free_result($result); ?> SEE ALSO
fbsql_fetch_array(3), fbsql_fetch_row(3), fbsql_fetch_assoc(3). PHP Documentation Group FBSQL_FETCH_OBJECT(3)
Man Page