DB_common::setOption()

DB_common::setOption() -- Sets run-time configuration options for PEAR DB

Synopsis

integer setOption (string $option, mixed $value)

Описание

Sets run-time configuration options for PEAR DB.

Параметр

string $option

name of the option to set

mixed $value

value to set the option to

Таблица 34-1.

OptionData TypeDefault ValueDescription
autofree boolean FALSE should results be freed automatically when there are no more rows?
debug integer 0 debug level
persistent boolean FALSE should the connection be persistent?
portability integer DB_PORTABILITY_NONE portability mode constant. These constants are bitwised, so they can be combined using | and removed using ^. See the examples below and the "Intro - Portability" for more information.
seqname_format string %s_seq the sprintf() format string used on sequence names. This format is applied to sequence names passed to createSequence(), nextID() and dropSequence().  
ssl boolean FALSE use ssl to connect?

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

integer - DB_OK on success or a DB_Error object on failure

Throws

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

Error codeError messageReasonSolution
NULL unknown option The given option does not exist Check $option for typographical errors

Заметка

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

Пример


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