mac 上的 Sqlserv 扩展 [英] Sqlserv extension on mac

查看:68
本文介绍了mac 上的 Sqlserv 扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的公司使用 sqlserv 扩展连接到 MSSQL 数据库.之所以选择此扩展而不是 mssql 扩展,是因为 Microsoft 正在积极维护它,并且根本不再维护 mssql 驱动程序.我的同事一直在 windows 环境中工作,所以他可以下载正确的 DLL 文件,瞧,sqlserv 可用.因为我在 Mac OSX 10.8.1 上运行,所以我不分享这个 luxery.

My company uses the sqlserv extension to connect to a MSSQL database. This extension was chosen over the mssql extension because it is actively being maintained by Microsoft and the mssql driver is no longer maintained at all. My colleague has always worked in a windows enviroment so he could just download the proper DLL file and voila, sqlserv is available. Since i am running on Mac OSX 10.8.1 i don't share this luxery.

所以基本上问题是:有人知道 .so 文件形式的 sqlserv php 扩展名吗?

So basically the question is: does anyone know of a sqlserv php extension in the form of a .so file?

推荐答案

您不能在 Windows 以外的任何设备上运行 SQLSRV 扩展,如下所述:

You cannot run the SQLSRV extension on anything other than Windows as stated here:

http://php.net/manual/en/sqlsrv.installation.php

但是,即使可以,我也强烈建议您远离 SQLSRV 扩展,因为它有很多错误且不发达.使用 PDO 会更好!

However, even if you could, I would strongly urge you to stay away from the SQLSRV extension as it is extremely buggy and underdeveloped. You would be much better off using PDO!

我花了几天时间试图确定要使用哪个扩展,经过对 stackoverflow 的大量研究和问题,很明显 PDO 是连接到 MSSQL 数据库的唯一现实解决方案.更不用说您拥有的附加功能了!

I spent days trying to work out which extension to use, and after much research and questions on stackoverflow, it was clear that PDO was the only realistic solution for connecting to an MSSQL database. Not to mention the additional functionality that you have!

尝试执行存储过程,使用 SQLSERV 扩展返回多个记录集以及输出参数!!使用 PDO 可以在几行代码中完成但使用 SQLSERV 无法完成的众多功能之一.

此外,PDO 速度更快!

Furthermore, PDO is faster!

这篇关于mac 上的 Sqlserv 扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆