Guys,

I need Help in making PHP APACHE and MS SQL SERVER 2000 to run.
I search a lot but still can not get the logic behind it. All that I understand is that I need to configure something in the PHP INI.

Is it possible in XAMPP? or I need to install PHP APACHE and MS SQL SERVER2000 separately? I am lost!

Thanks Guys!

I would recommend using XAMPP, however, it uses MySQL not MS SQL. Im not even sure if you can get apache and php to work with MS SQL (well, you probably can but I'll guarantee it's more effort than it is worth).

XAMPP is an all-in-one wunderkind php development kit. (without an IDE unfortunately)

Hi,

You can use XAMPP.. No issues..
But yes you need to setup and install MSSQL Server separately.
Make sure yyou create a tble in MS SQL and then run queries in MS SQL.

XAMPP contains an extension for MSSQL and usually its enabled by default.
You can check php.ini file to ensure this (<dir>\xampp\apache\bin\php.ini). Open this file and make sure extension=php_mssql.dll and extension=php_pdo_mssql.dll are enabled (there is no ; in front of these extensions).

This will enable you to access mssql server database.
Refer this link for more info: http://www.php.net/manual/en/ref.mssql.php

Hi,

You can use XAMPP.. No issues..
But yes you need to setup and install MSSQL Server separately.
Make sure yyou create a tble in MS SQL and then run queries in MS SQL.

XAMPP contains an extension for MSSQL and usually its enabled by default.
You can check php.ini file to ensure this (<dir>\xampp\apache\bin\php.ini). Open this file and make sure extension=php_mssql.dll and extension=php_pdo_mssql.dll are enabled (there is no ; in front of these extensions).

This will enable you to access mssql server database.
Refer this link for more info: http://www.php.net/manual/en/ref.mssql.php

Just as easy as that? ok thanks I will try it immediately! Thanks Man

But if we use php with MSSQL, won't the syntax for connecting change???

But if we use php with MSSQL, won't the syntax for connecting change???

I haven't tried it yet really but I think there are slight changes on the syntax (I THINK). I saw the functions used, its quite similar. except for the MSSQL_ prefix. follow the link by sikka_varun.

I recommend that you go through all the syntax and not just of establishing connection.

Member Avatar for diafol

There are definitely differences in SQL language between MySQL and MS SQL (just as there are between other dbs). You must check all statements thoroughly. If you've used one of the PEAR/PECL database extensions, ensure that the one you've used can be configured for MSSQL. If you're not using a data abstraction layer, the changes should be quite straightforward.

e.g.
MS SQL: SELECT TOP(7) * FROM table1 ORDER BY field3

MYSQL: SELECT * FROM table1 ORDER BY field3 LIMIT 7

MS SQL doesn't support batch updates either as far as I know (you'll have to write individual statements or use a php loop).

Due to this, if you've got some php code that builds SQL clauses and then puts them together just before running them, you'll have to sort through this code as well, just in case.


An interesting article here:
http://troels.arvin.dk/db/rdbms/

commented: Nice link. +3

Thanks guys for the advise, and I highly APPRECIATE IT.
THANKS man.


All are noted.

:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.