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...