Php connection and configuration with the mssql database _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
How to connect and configure php with the mssql database. Php Tutorial how to connect and configure PHP extension php_mssql.dll with mssql database tutorial to connect SQLServer2000, use mssql series functions to operate, and operate MySQL. 1. open the PH php Tutorial to connect to and configure the mssql database tutorial.
PHP extension php_mssql.dll connects to SQL Server 2000 and uses mssql functions, which is the same as MySQL.

1. open the PHP configuration file php. ini and find; extension = php_mssql.dll and remove the semicolon.

2. find mssql. secure_connection = Off and change it to mssql. secure_connection = On.

3. copy the php_mssql.dll and ntwdblib. DLL files in the PHP folder to the C: windowssystem32 folder.

4. restart Apache. OK.

*/
// Use mssql_connect

$ Conn = mssql_connect ('localhost', 'pandao', '000000') or die ('bkjia. c0m database connection disconnection ');
Mssql_select_db ('test', $ conn );
// Query statement
$ Query = "select * from news ";
$ AdminResult = mssql_query ($ Query );
// Output result
$ Num = mssql_num_rows ($ AdminResult );
For ($ I = 0; $ I <$ Num; $ I ++)
{
$ Row = mssql_fetch_array ($ AdminResult );
Echo ($ Row [1]);
Echo ("
");
}

The extension php_mssql.dll provided by PostgreSQL connects to SQL Server 2000 and uses functions of the mssql series to operate MySQL. 1. open PH...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.