Changeset 209 for trunk/lib/DB.inc.php
- Timestamp:
- Nov 29, 2006 1:25:59 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/DB.inc.php
r172 r209 143 143 // Die or continue without connection? 144 144 if ($this->getParam('db_die_on_failure')) { 145 echo "\n\n<!-- Script execution stopped out of embarrassment. -->";145 echo "\n\n<!-- Script execution stopped out of embarrassment. There was a database error. -->"; 146 146 die; 147 147 } else { … … 154 154 155 155 // Tell MySQL what character set we're useing. Available only on MySQL verions > 4.01.01. 156 $this->query("/*!40101 SET NAMES '" . $this->mysql_character_sets[strtolower($app->getParam('character_set'))] . "' */"); 156 if ('' != $app->getParam('character_set') && isset($this->mysql_character_sets[strtolower($app->getParam('character_set'))])) { 157 $this->query("/*!40101 SET NAMES '" . $this->mysql_character_sets[strtolower($app->getParam('character_set'))] . "' */"); 158 } else { 159 $app->logMsg(sprintf('%s is not a known character_set.', $app->getParam('character_set')), LOG_ERR, __FILE__, __LINE__); 160 } 157 161 158 162 return true;
Note: See TracChangeset
for help on using the changeset viewer.