How do I connect to a MSSQL database with the Zend Framework?
I'm trying to connect to a mssql db with the Zend Framework, my application.ini looks like this:
resources.db.adap开发者_如何学Pythonter = "sqlsrv"
resources.db.params.host = "localhost\SQLExpress" resources.db.params.username = "*" resources.db.params.password = "**" resources.db.params.dbname = "Database" resources.db.isDefaultTableAdapter = trueIs there anything wrong with the above?
Thanks.
resources.db.adapter = "sqlsrv"
resources.db.host = "localhost\SQLEXPRESS"
resources.db.dbname = "DatabaseName"
resources.db.isDefaultTableAdapter = true
resources.db.driver_options.ReturnDatesAsStrings = true
No need for Username or Password.
I always use ReturnDatesAsStrings as it is much easier to handle MsSQL in this way.
精彩评论