added "LoginTimeout"
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
/**
|
||||
* @desc A simple and convenient php sqlsrv class
|
||||
* @author Yaseng WwW.Yaseng.Me []
|
||||
* v1.3
|
||||
* @link
|
||||
* @author Originaly made by Yaseng WwW.Yaseng.Me, now maintained and update by Sebastien Plante
|
||||
* @version v1.4
|
||||
* @link https://gitea.urbanghetto.net/nka/php_sqlsrv_class
|
||||
*/
|
||||
|
||||
class sqlsrv
|
||||
@@ -19,7 +19,7 @@ class sqlsrv
|
||||
//connection
|
||||
function __construct($server, $user, $pass, $dbname)
|
||||
{
|
||||
$this->conn = @sqlsrv_connect($server, array('UID' => $user, 'PWD' => $pass, 'Database' => $dbname));
|
||||
$this->conn = @sqlsrv_connect($server, array('UID' => $user, 'PWD' => $pass, 'Database' => $dbname, 'LoginTimeout' => 10));
|
||||
if ($this->conn === false) {
|
||||
$this->error_log[] = sqlsrv_errors();
|
||||
throw new Exception($this->error_log[0][0]["message"]);
|
||||
|
||||
Reference in New Issue
Block a user