Example #1
0
 /**
  * enabled the usage of a root-connection to the database
  * Note: must be called *before* any prepare/query/etc.
  * and should be called again with 'false'-parameter to resume
  * the 'normal' database-connection
  *
  * @param bool $needroot
  * @param int $dbserver optional
  */
 public static function needRoot($needroot = false, $dbserver = 0)
 {
     // force re-connecting to the db with corresponding user
     // and set the $dbserver (mostly to 0 = default)
     self::_setServer($dbserver);
     self::$_needroot = $needroot;
 }