Php operation mssql $ conn = @ mssql_connect ("127.0.0.1", "sa", "database") or die ("connection error ");
Mssql_select_db ("test") or die ("no such database ");
$ SQL = "select * from login ";
$ Result = mssql_query ($ SQL );
While ($ row = mssql_fetch_assoc ($ result ))
{
Echo $ row ['id']. "". $ row ['user']."
";
}
Mssql_close ($ conn );
// ================================================ ================================
Connecting SQL Server with PHP
Modify php. ini
1. remove the; sign before extension = php_mssql.dll.
2. confirm that extension_dir is the correct path. take the local machine as an example: extension_dir = "C: \ php \ extensions"
OK, restart the server and test ing...
If not, try the following method:
PS: I have passed the test on several computers, but I reported an error on my machine saying that c: \ php \ extensions \ php_mssql.dll could not be found, but this file exists clearly.
Solution:
Put php_mssql.dll and ntwdblib. dll in the system directory \ system32 and restart the test...
(Note: The above two dll files are not in the same directory. Please search for them yourself. ^ _____ ^)