diff --git a/htdocs/lib/mysql.lib.php b/htdocs/lib/mysql.lib.php
index 0dd38060ebf..638c747764a 100644
--- a/htdocs/lib/mysql.lib.php
+++ b/htdocs/lib/mysql.lib.php
@@ -23,13 +23,14 @@
*/
class DoliDb {
- var $db, $results, $ok;
+ var $db, $results, $ok, $connected, $database_selected;
Function DoliDb($type = 'mysql', $host = '', $user = '', $pass = '', $name = '')
{
- // print "Name DB : $host, $user, $pass, $name
";
global $conf;
-
+
+ // print "Name DB : $host, $user, $pass, $name
";
+
if ($host == '')
{
$host = $conf->db->host;
@@ -51,7 +52,6 @@ class DoliDb {
}
$this->db = $this->connect($host, $user, $pass);
-
if ($this->db)
{
$this->connected = 1;
@@ -123,8 +123,7 @@ class DoliDb {
Function close()
{
- $this->ret = mysql_close($this->db);
- return $this->ret;
+ return mysql_close($this->db);
}
Function begin($do=1)