We help IT Professionals succeed at work.

PHP and SQL2000?

cburns99n asked
I am interested in Using SQL 2000 with a PHP Interface.  What are the advantages and disadvantages to this philosophy?
Watch Question

You mean a generic interface?

Or do you mean a database deployed on SQL Server 2000 and PHP used to access it? Perhaps both from a general user perspective and administration perspective?

Well if you are looking for this together with the interface being web based then PHP is excellent.

It has a fantastic wealth of built in modules for database integration which together with it's ease of use and portability (and of course it is free!) I highly recommend it.

If in the future you decided to migrate from SQL Server to a different database, provided you designed your system well, you would find it good going with PHP. Even if you moved from Windows to a different operating system.

Some useful links for you:




Please feel free to fire more specific questions about it.




Can You show me any example sites where it is using a php/SQL2000 Combination.  The Definition sites were very helpful.

I personally don't know any - I know loads that use PHP but it can be virtually impossible to tell what database system (if any) is used.

For getting an idea of the sites that use PHP check out:

(this is a little old now)


All the sites I have developed over the past year have been in PHP - I love it!

Database wise we've always used MySQL, but that is mainly because we deploy almost all the sites on Linux. Saying that though I did develop a system using PHP/MySQL on Linux (with Apache) and it was actually deployed on Windows 2000 Server and IIS. And there were only three or four lines of code to change (due to differences in the email system). Now that is what you call portability!!

Hope I have been of some help.




We are mainly developing with PHP4 and MSSQL 2000 and are quite happy with it. No problems, good performance and tight integration with mssql's dynamic extension.

Kind regards,
In answer to your original question, I don't really see where the disadvantages are. I mean, even if you install PHP on your IIS 5 server, you can still use ASP. The only possible disadvantage I could construe is that you now have more choices when developing a project. In the end, SQL (the generic term) is SQL, PHP doesn't change that.

There are some interesting comparisons between PHP and ASP's speed at accessing MS SQL at http://php.weblogs.com/php_vs_asp , and at http://php.weblogs.com/php_asp_7_reasons . Essentially what they found is that PHP could access SQL 7 just as fast as ASP, using ODBC, but that PHP could actually use the native DB interface, and connect even faster than ASP.

Point is, anything you can do with ASP/MSSQL, you should be able to do with PHP. The real difference will not be in SQL, but in your programming language. SQL is pretty much a standard interface, and is one of the most common areas between different OS's, such as Windows or Unix. MSSQL is one of the better products put out by Microsoft, and has its roots in the Sybase DB for Unix. It is no Oracle, but it is definitely worth taking seriously as a database platform. In other words, the thing to worry about is not whether SQL 2000 is good enough for PHP, or whether PHP can handle SQL 2000, but whether you are ready for PHP, which is quite a different language than VB/ASP. (I know I'm presuming that you use ASP, but generally people using MSSQL are coming from the world of VB/ASP. Am I wrong?)

I personally heartily recommend PHP. I used to work with ASP a little, and never understood why I disliked it so much, until I started working with PHP. Maybe it's because I prefer the C-type syntax, such as what you find in Java, Javascript, etc... all the other web technologies. I just find the PHP syntax and approach so much more direct and logical. It seems like everything is right at your fingertips. The real power of PHP is not just that it connects to so many different databases, but also that it has modules to access just about every other web technology out there. To do many of the same things in ASP, you would have to buy all kinds of 3rd party software.

Here is a good link that explains differences between PHP syntax and VBSCRIPT/ASP: http://www.zend.com/zend/art/langdiff.php

Also, if you decide to go with PHP, I recommend upgrading to the new PHP 4.0.7 or 4.0.8 when it comes out, because they have apparently done some good work in the PHP ISAPI module, to improve performance and integration with IIS 5.

Any update?

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

>> Split a.marsh, and rycamor

Please leave any comments here within the next four days.


EE Cleanup Volunteer

Explore More ContentExplore courses, solutions, and other research materials related to this topic.