Merged patch #449548 (fix for mysql error on no default server) thanks to Kendrick Vargas

This commit is contained in:
Loïc Chapeaux
2001-08-09 23:55:15 +00:00
parent e90436c39d
commit 3597f8e3ad
2 changed files with 4 additions and 3 deletions

View File

@@ -8,6 +8,9 @@ $Source$
2001-08-10 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* tbl_replace.php3, lines 76, 78, 86, 88, 137, 139, 147, 149: fixed some
others slashes bugs.
* defines.inc.php3, lines 41 & 43: merged patch #449548 (fix for mysql
error on no default server) thanks to
Kendrick Vargas <drama@users.sourceforge.net>.
2001-08-09 Olivier M<>ller <om@omnis.ch>
* releasing 2.2.0rc4

View File

@@ -38,10 +38,8 @@ if (defined('PHP_OS') && eregi('win', PHP_OS)) {
}
// MySQL Version
//$result = @mysql_query('SELECT VERSION() AS version');
$result = mysql_query('SELECT VERSION() AS version');
$result = @mysql_query('SELECT VERSION() AS version');
if ($result != FALSE && @mysql_num_rows($result) > 0) {
$result = mysql_query('SELECT VERSION() AS version') or mysql_die();
$row = mysql_fetch_array($result);
define('MYSQL_MAJOR_VERSION', (double)substr($row['version'], 0, 4));
define('MYSQL_MINOR_VERSION', (double)substr($row['version'], 5));