Пример #1
0
 /**
  * Constructor
  *
  * Initializes a TIP_Mysql instance.
  *
  * $options inherits the TIP_Type properties, and add the following:
  * - $options['server']:   server address
  * - $options['database']: database name (required)
  * - $options['user']:     user name (required)
  * - $options['password']: user password (required)
  *
  * @param array $options Properties values
  */
 protected function __construct($options)
 {
     parent::__construct($options);
     $this->_connection = mysql_connect($this->server, $this->user, $this->password);
     if (!$this->_connection || !mysql_select_db($this->database, $this->_connection)) {
         TIP::error(mysql_error($this->_connection));
     } else {
         $this->query('SET CHARACTER SET utf8');
     }
 }
Пример #2
0
 /**
  * Constructor
  *
  * Initializes a TIP_Bucket instance.
  *
  * @param array $options Properties values
  */
 protected function __construct($options)
 {
     parent::__construct($options);
 }