コード例 #1
0
 public function connect($dbhost, $dbuser, $dbpass, $dbname, $prefix, array $dboptions = null)
 {
     if ($prefix == '' and !$this->external) {
         //Enforce prefixes for everybody but mysql
         throw new dml_exception('prefixcannotbeempty', $this->get_dbfamily());
     }
     return parent::connect($dbhost, $dbuser, $dbpass, $dbname, $prefix, $dboptions);
 }
コード例 #2
0
 public function connect($dbhost, $dbuser, $dbpass, $dbname, $prefix, array $dboptions = null)
 {
     if ($prefix == '' and !$this->external) {
         //Enforce prefixes for everybody but mysql
         throw new dml_exception('prefixcannotbeempty', $this->get_dbfamily());
     }
     if (!$this->external and strlen($prefix) > 2) {
         //Max prefix length for Oracle is 2cc
         $a = (object) array('dbfamily' => 'oracle', 'maxlength' => 2);
         throw new dml_exception('prefixtoolong', $a);
     }
     return parent::connect($dbhost, $dbuser, $dbpass, $dbname, $prefix, $dboptions);
 }