CHAPTER 6 – PEAR DB – Configuration Options
You can configure some of the DB behavior per connection with the setOption() method. Options are parameters that are less frequently used than the ones used in the DB::connect() factory method: $dbh->setOption("autofree", true); Each option has a name and a value. The value may be of any type, but the currently implemented options exclusively use string and integer values. Most configuration options may be changed at any time, except for the ones that affect the database connection (persistent and ssl). The options supported by DB are the following: persistent. (Boolean) Whether DB uses a persistent connection to the backend DBMS. ssl. (Boolean) Whether to use SSL (secure sockets layer) connections to the database (may not be available). debug. (integer) For adjusting debug information. 0 means no debug info, and 1 means some debug info. seqname_format. (string) Table or sequence name format used by emulated DB sequences. *printf-style format string, where %s is substituted by the DB sequence name. Defaults to %s_seq. Changing this option after populat- ing your database may completely break your application, so be careful! autofree. (Boolean) Whether to automatically free result sets after que- ries are finished (instead of PHP doing it at the end of the request if you forget to do it yourself). portability. (integer) Bitmap telling what features DB should emulate for inter-DBMS portability; see the "Portability Features" section later in this chapter for more details.