diff --git a/htdocs/lib/mysql.lib.php b/htdocs/lib/mysql.lib.php index 7029acdba80..771ebf2af5b 100644 --- a/htdocs/lib/mysql.lib.php +++ b/htdocs/lib/mysql.lib.php @@ -57,8 +57,7 @@ class DoliDb { } else { - print "Db->Db() raté
\n"; - $this->connected = 1; + $this->connected = 0; return 0; } @@ -88,7 +87,7 @@ class DoliDb { */ Function connect($host, $login, $passwd) { - $this->db = mysql_connect($host, $login, $passwd); + $this->db = @mysql_connect($host, $login, $passwd); return $this->db; } /* @@ -171,6 +170,16 @@ class DoliDb { return $this->results; } + /* + * + */ + Function list_tables($database) + { + $this->results = mysql_list_tables($database, $this->db); + return $this->results; + } + + Function result($nb, $fieldname) { return mysql_result($this->results, $nb, $fieldname);