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 Quote 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 Quote 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 Quote 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. Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.