SQL Server而不是MYSQL在WAMP [英] SQL Server instead of MYSQL in WAMP

查看:113
本文介绍了SQL Server而不是MYSQL在WAMP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

结果
我们有一个使用WAMP服务器的应用程序。现在,有一个从谁想要使用MS SQL Server而不是MySQL的客户的新要求。
多么容易地移植到从MySQL的SQL Server。还具有保持该结构。
Apache-> PHP的>在Windows上的SQL Server。
我怎样才能连接来自Apache到SQL Server。希望PHP行之有效与SQL服务器。


We have an application which uses WAMP server. Now, there is a new requirement from a customer who wants to use MS SQL Server instead of MySQL. How easy is it to port to SQL Server from MySQL. Also it has to retain this configuration. Apache->PHP->SQL Server on windows. How can I connect from Apache to SQL Server. Hope PHP works well with SQL server.

请指教。结果
谢谢,结果
Vish

Please advise.
Thanks,
Vish

推荐答案

您不需要做任何特殊的Apache,你只需要在PHP中使用了正确的接口。也就是说, MSSQL 的东西,托比亚斯联系,或者 - 也许更好 - 的 PDO 可以配置为使用的或者的MySQL或MS SQL。 PDO可能会轻松很多前进,如果你要结束了,同时支持的数据库引擎。

You don't need to do anything special with Apache, you just need to use the correct interface in PHP. That is, the mssql stuff that Tobias linked to, or - perhaps better - PDO which can be configured to use either MySQL or MS SQL. PDO would probably be a lot easier going forward if you have to end up supporting both database engines.

在的MySQL和SQL Server之间的差异方面,有相当多的不幸。最可气的将是对某些类型的查询语法会略有不同(DDL - 也就是,创建表,索引等等 - 是完全不同),虽然他们都支持标准SQL的一个足够大的一部分,你可以通常找到一种方法做,在他们两人的作品最一切。但是,不要指望仅仅连接到SQL Server,并拥有所有的MySQL只是工作书面查询的 - 不幸的是,他们不会

In terms of differences between the MySQL and SQL Server, there are quite a lot unfortunately. Most annoying will be that the syntax for certain types of queries will be slightly different (and DDL - that is, creating tables, indexes and so on - is completely different!) Though they both support a big enough subset of standard SQL that you can usually find a way to do most everything that works in both of them. But don't expect to just connect to SQL Server and have all of your queries written for MySQL "just work" - unfortunately, they won't.

我猜到底,做最简单的事情就是要尝试一下。如果它看起来像它的将是太多(例如,如果你使用了大量的晦涩MySQL的功能),那么你可能需要重新考虑你的选择。

I guess in the end, the easiest thing to do is just to try it out. If it looks like it's going to be too much (for example, if you're using a lot of 'obscure' MySQL features), then you might have to rethink your options.

这篇关于SQL Server而不是MYSQL在WAMP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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