DB_common::setFetchMode()

DB_common::setFetchMode()

DB_common::setFetchMode() -- Sets the default fetch mode

Description

Sets the default fetch mode used by fetch*() and get*() methods.

Parameter

integer $fetchmode

DB_FETCHMODE_ORDERED, DB_FETCHMODE_ASSOC or DB_FETCHMODE_OBJECT.

See the Examples section, below, for more information.

string $object_class

This parameter is for use when $fetchmode is set to DB_FETCHMODE_OBJECT.

You can set this parameter to DB_row, which then causes the resulting data to populate a new instance of a DB_row object.

Return value

void - nothing is returned on success or a DB_Error object on failure

Note

This function can not be called statically.

Example

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.