CincoPistolero Posted November 2, 2007 Share Posted November 2, 2007 I'm trying to make a db connection to a MS-Sql server. Below is my code, and my error. $connection = mssql_connect($host, $dbuser, $dbpass) or die ("Unable to connect!"); mssql_select_db($dbname, $connection) or die ("Unable to select database!"); ?> and this is the error. PHP Fatal error: Call to undefined function mssql_connect() in Link to comment https://forums.phpfreaks.com/topic/75809-solved-db-connection-to-mssql-error/ Share on other sites More sharing options...
~n[EO]n~ Posted November 2, 2007 Share Posted November 2, 2007 Maybe, Edit your php.ini file and uncomment (remove the semicolon from) the following line of code. extension=php_mssql.dll Link to comment https://forums.phpfreaks.com/topic/75809-solved-db-connection-to-mssql-error/#findComment-383679 Share on other sites More sharing options...
otuatail Posted November 2, 2007 Share Posted November 2, 2007 should it be mysql_connect NOT mssql_connect Desmond Link to comment https://forums.phpfreaks.com/topic/75809-solved-db-connection-to-mssql-error/#findComment-383680 Share on other sites More sharing options...
~n[EO]n~ Posted November 2, 2007 Share Posted November 2, 2007 should it be mysql_connect NOT mssql_connect Desmond He is talking about Microsoft SQL Server not My SQL mssql_connect() establishes a connection to a MS SQL server. Link to comment https://forums.phpfreaks.com/topic/75809-solved-db-connection-to-mssql-error/#findComment-383681 Share on other sites More sharing options...
CincoPistolero Posted November 2, 2007 Author Share Posted November 2, 2007 thanks for all the responses. My sysadmin neglected to add the mssql extension when he installed php. Link to comment https://forums.phpfreaks.com/topic/75809-solved-db-connection-to-mssql-error/#findComment-383705 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.