We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

how to connect to sqlserver and use mysql with sqlserver together?

hello all, I want to use two databases mysql and add a sqlserver ? How can I add service in two db inject

edited Sep '16

You need to define two separate services, or to override 'db' service in a way that will accept your custom parameters or flags in order to distinguish between two RDBMS.

One thing is for sure, go for pdo_dblib / FreeTDS to work with MSSQL. Phalcon does not support MSSQL as native adapter, so you'll need to either use PHP PDO or to build your own set of classes / methods (ORM) to work with it.