Error using MSSQL

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
radders
Registered User
Posts: 19
Joined: Tue Aug 22, 2017 2:35 pm

Error using MSSQL

Post by radders »

Hello,
I'm creating an Extension which will connect to an MS SQL database (the main code uses MySQL).

I have added the following lines of code:

Code: Select all

class mssql extends \phpbb\auth\provider\base
public function __construct(...)
	{
		$this->db= new \phpbb\db\driver\mssqlnative;
		$this->db->sql_connect("127.0.0.1", "phpbb", "phpbb", "phpbb", 1433);
	}
but I'm getting an error in the

Code: Select all

mssqlnative
code because function

Code: Select all

sqlsrv_connect
can't be found.

What step(s) have I missed? I have added the DLL and enabled it (sql server shows in phpinfo).

Thanks
Post Reply

Return to “Extension Writers Discussion”