PDO + SqlAnywhere,可能吗?
我想将 PHP PDO 与 SqlAnywhere 一起使用,但 php 站点上没有驱动程序。我可以添加 sqlanywhere 库以与 PDO 一起使用吗? ODBC 是最后一个选项。
I would like use PHP PDO with SqlAnywhere, but don't have the driver on php site. Can I add a lib of sqlanywhere to use with PDO? ODBC is the last option.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
PDO SQL Anywhere 驱动程序现已在此处发布: http://pecl.php.net/package/PDO_SQLANYWHERE /
A PDO SQL Anywhere driver has now been released here: http://pecl.php.net/package/PDO_SQLANYWHERE/
我还没有尝试过这个,但是两天内没有人回答,所以我会给出一个建议:
理论上,PDO_MSSQL 驱动程序应该能够与任何 FreeTDS 后端通信,包括 Sybase Server 甚至 Sybase ASA。它可能需要您进行一些搜索和阅读博客、论坛等,以找出正确的 freetds.conf 条目以使其正常工作。
然而,PDO_MSSQL 驱动程序被标记为“实验性”,据我所知没有人维护它。 Microsoft 也放弃了它,因为他们正在为 SQL Server 开发自己的(非 PDO)PHP 扩展。*
因此,使用 PDO_ODBC 可能是您的更勇敢的部分。
I haven't tried this, but no one has answered in two days so I'll give a suggestion:
The PDO_MSSQL driver should in theory be able to talk to any FreeTDS back-end, including Sybase Server and perhaps even Sybase ASA. It may require you to do some hunting and reading blogs, forums, etc. to figure out the right freetds.conf entries to make it work.
However, the PDO_MSSQL driver is marked as "experimental" and AFAIK no one is maintaining it. Microsoft has abandoned it as well, since they're developing their own (non-PDO) PHP extension for SQL Server.*
So it's probably the better part of valor on your part to use PDO_ODBC.
是的,但是你应该修改unixodbc库,脚本:SQLExecute.c,否则会得到错误:PERMISSION DENIED CREATE STORE PROCEDURE
Yes, but you should modify the unixodbc library, the script: SQLExecute.c, otherwise will get the error : PERMISSION DENIED CREATE STORE PROCEDURE