includes/dbal.php
changeset 250 acb9d021b860
parent 142 ca9118d9c0f2
child 251 275c70f80137
child 256 62ee6685ad18
equal deleted inserted replaced
246:c9fd175289aa 250:acb9d021b860
   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