You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have pulled out my last hair so I need some help.
How do I set up connection to a MS SQL server using SQLSRV driver. I have no problem setting up a PDO connection and retrieve data, but I cant make the SQLSRV version work.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I have pulled out my last hair so I need some help.
How do I set up connection to a MS SQL server using SQLSRV driver. I have no problem setting up a PDO connection and retrieve data, but I cant make the SQLSRV version work.
This is my code:
db()->connect([
'dbtype' => 'sqlsrv',
'host' => '10.0.X.X',
'username' => 'DBUser',
'password' => 'YouNeverGuess<',
'dbname' => 'Customer'
]);
$result = db()->query('SELECT * FROM devTest')->all();
$total = count((array)$result);
And this is the driver setup in php.ini
extension=php_sqlsrv_82_nts_x64.dll
What am I doing wrong?
/Torben
Beta Was this translation helpful? Give feedback.
All reactions