forked from Wavyzz/dolibarr
Qual: Meilleur gestion erreur si fonctions mysql non dispo sur le php
This commit is contained in:
@@ -90,6 +90,16 @@ class DoliDb
|
|||||||
$this->transaction_opened=0;
|
$this->transaction_opened=0;
|
||||||
|
|
||||||
//print "Name DB: $host,$user,$pass,$name<br>";
|
//print "Name DB: $host,$user,$pass,$name<br>";
|
||||||
|
|
||||||
|
if (! function_exists(mysql_connect))
|
||||||
|
{
|
||||||
|
$this->connected = 0;
|
||||||
|
$this->ok = 0;
|
||||||
|
$this->error="Mysql PHP functions are not available in this version of PHP";
|
||||||
|
dolibarr_syslog("DoliDB::DoliDB : Mysql PHP functions are not available in this version of PHP");
|
||||||
|
return $this->ok;
|
||||||
|
}
|
||||||
|
|
||||||
if (! $host)
|
if (! $host)
|
||||||
{
|
{
|
||||||
$this->connected = 0;
|
$this->connected = 0;
|
||||||
@@ -161,7 +171,7 @@ class DoliDb
|
|||||||
*/
|
*/
|
||||||
function connect($host, $login, $passwd, $name)
|
function connect($host, $login, $passwd, $name)
|
||||||
{
|
{
|
||||||
$this->db = @mysql_connect($host, $login, $passwd);
|
$this->db = mysql_connect($host, $login, $passwd);
|
||||||
//print "Resultat fonction connect: ".$this->db;
|
//print "Resultat fonction connect: ".$this->db;
|
||||||
return $this->db;
|
return $this->db;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user