includes/dbal.php
changeset 251 275c70f80137
parent 166 d53cc29308f4
parent 250 acb9d021b860
child 266 917dcc6c4ceb
equal deleted inserted replaced
249:f4323fa79313 251:275c70f80137
   138     unset($dbpasswd); // Security
   138     unset($dbpasswd); // Security
   139     if(!$this->_conn) { dc_here('dbal: uhoh!<br />'.mysql_error()); grinding_halt('Enano is having a problem', '<p>Error: couldn\'t connect to MySQL.<br />'.mysql_error().'</p>'); }
   139     if(!$this->_conn) { dc_here('dbal: uhoh!<br />'.mysql_error()); grinding_halt('Enano is having a problem', '<p>Error: couldn\'t connect to MySQL.<br />'.mysql_error().'</p>'); }
   140     $this->query_backtrace = '';
   140     $this->query_backtrace = '';
   141     $this->num_queries = 0;
   141     $this->num_queries = 0;
   142     dc_here('dbal: we\'re in, selecting database...');
   142     dc_here('dbal: we\'re in, selecting database...');
   143     $q = $this->sql_query('USE '.$dbname.';');
   143     $q = $this->sql_query('USE `'.$dbname.'`;');
   144     if(!$q) $this->_die('The database could not be selected.');
   144     if(!$q) $this->_die('The database could not be selected.');
   145     dc_here('dbal: connected to MySQL');
   145     dc_here('dbal: connected to MySQL');
   146     $this->disable_errorhandler();
   146     $this->disable_errorhandler();
   147   }
   147   }
   148   
   148