From 203184b1f12045e28117b970ff6c714d37e70d38 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Thu, 26 Feb 2004 15:18:16 +0000 Subject: [PATCH] Fix for PHP5, formatting changes. git-svn-id: https://develop.svn.wordpress.org/trunk@940 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/wp-db.php | 177 ++++++++++++------------------------------ 1 file changed, 50 insertions(+), 127 deletions(-) diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index d965a66f71..b7d87fe554 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -26,13 +26,9 @@ // ================================================================== // DB Constructor - connects to the server and selects a database - function wpdb($dbuser, $dbpassword, $dbname, $dbhost) - { - + function wpdb($dbuser, $dbpassword, $dbname, $dbhost) { $this->dbh = @mysql_connect($dbhost,$dbuser,$dbpassword); - - if ( ! $this->dbh ) - { + if ( ! $this->dbh ) { die("

Error establishing a database connection! This probably means that the connection information in youn wp-config.php file is incorrect. Double check it and try again.

"); } - $this->select($dbname); $this->querycount = 0; - } // ================================================================== // Select a DB (if another one needs to be selected) - function select($db) - { - if ( !@mysql_select_db($db,$this->dbh)) - { + function select($db)x{ + if ( !@mysql_select_db($db,$this->dbh)) { die("

We're having a little trouble selecting the proper database for WordPress.