We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I know that this lib is not support phalcon 3 and php7, but few small changes make it run. I had to install php7.0-sybase and php-sybase
All changes are in Phalcon/Db/Adapter/Pdo/Sqlsrv.php
first: change declaration of connect function:
from: public function connect($descriptor = null) to: public function connect(array $descriptor = null)
public function connect($descriptor = null)
public function connect(array $descriptor = null)
second: change connection via PDO from: $this->_pdo = new \PDO("sqlsrv:server={$descriptor['host']}:1433;database={$descriptor['dbname']}", $descriptor['username'], $descriptor['password'], $options); to: `$options[\PDO::ATTR_ERRMODE] = \PDO::ERRMODE_EXCEPTION; $options[\PDO::ATTR_STRINGIFY_FETCHES] = true;
$this->_pdo = new \PDO("sqlsrv:server={$descriptor['host']}:1433;database={$descriptor['dbname']}", $descriptor['username'], $descriptor['password'], $options);
$dsn= "dblib:host=".$descriptor['host'].":1433;dbname=".$descriptor['dbname'].";"; $dbusername=$descriptor['username']; $dbpassword=$descriptor['password']; $this->_pdo = new \PDO($dsn,$dbusername,$dbpassword); $this->_pdo->setAttribute(\PDO::ATTR_ERRMODE,\PDO::ERRMODE_EXCEPTION);`
third and last: change declaration $dialectClass variable from:
$dialectClass = 'Phalcon\\Db\\Dialect\\' . $this->_dialectType; to: $dialectClass = 'Phalcon\\Db\\Dialect\\' . ucfirst($this->_dialectType);
$dialectClass = 'Phalcon\\Db\\Dialect\\' . $this->_dialectType;
$dialectClass = 'Phalcon\\Db\\Dialect\\' . ucfirst($this->_dialectType);
that changes help me and let use this lib co connect with mssql.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I know that this lib is not support phalcon 3 and php7, but few small changes make it run.
I had to install php7.0-sybase and php-sybase
All changes are in Phalcon/Db/Adapter/Pdo/Sqlsrv.php
first: change declaration of connect function:
from:
public function connect($descriptor = null)
to:
public function connect(array $descriptor = null)
second: change connection via PDO
from:
$this->_pdo = new \PDO("sqlsrv:server={$descriptor['host']}:1433;database={$descriptor['dbname']}", $descriptor['username'], $descriptor['password'], $options);
to:
`$options[\PDO::ATTR_ERRMODE] = \PDO::ERRMODE_EXCEPTION;
$options[\PDO::ATTR_STRINGIFY_FETCHES] = true;
third and last: change declaration $dialectClass variable from:
$dialectClass = 'Phalcon\\Db\\Dialect\\' . $this->_dialectType;
to:
$dialectClass = 'Phalcon\\Db\\Dialect\\' . ucfirst($this->_dialectType);
that changes help me and let use this lib co connect with mssql.
The text was updated successfully, but these errors were encountered: