开发者

SQL Server instead of MYSQL in WAMP

We have an application which uses WAMP server. Now, there is a new requirement from a customer who开发者_如何学Python 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.

Please advise.

Thanks,

Vish


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.

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.

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.


There are huge differences between MYSQL and MS even in basic queries.
So, all your database work should be rewritten.
The rest is not a big deal.


I'm guessing you mean MSSQL?

http://us2.php.net/mssql

mySQL... msSQL ... basically the same. You shouldn't have any problems if you don't use "fancy" queries - best would be just to try it out and see what happens.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜