DB_common::setFetchMode()

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

Synopsis

void setFetchMode (integer $fetchmode [, string $object_class = stdClass])

Описание

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

Параметр

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.

Возвращаемое значение

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

Throws

Таблица 34-1. Возможные значения PEAR_Error

Error codeError messageReasonSolution
NULL invalid fetchmode mode The given fetch mode does not exists or is not implement in your DB version. Check writing of the argument and your used version of DB.

Заметка

Эта функция не должна вызываться статически.

Пример


HIVE: All information for read only. Please respect copyright!
Hosted by hive йца: йХЕБЯЙЮЪ ЦНПНДЯЙЮЪ АХАКХНРЕЙЮ