Jump to content

Recommended Posts

i am using php 5 and microsoft sql 2000. i am trying to connect php document to microsoft sql database but the error they give me is this:

 

Error selecting the databasePHP Warning: PHP Startup: Unable to load dynamic library './php_pdo_mssql.dll' - The specified module could not be found. in Unknown on line 0 PHP Notice: Undefined variable: connection in C:\Inetpub\wwwroot\practice-php-in-progress\FRE.php on line 11 PHP Notice: Undefined variable: cfg in C:\Inetpub\wwwroot\practice-php-in-progress\FRE.php on line 14 PHP Warning: mssql_select_db() [function.mssql-select-db]: Unable to select database: in C:\Inetpub\wwwroot\practice-php-in-progress\FRE.php on line 14

 

the codes that i am using to connect the php doc to the database is as follows:

<html>

<body>

<?php

while(!$connection){

@$connection = mssql_connect($cfg['localhost'],$cfg['sp'],$cfg['sp']);

}

$db = mssql_select_db($cfg['Hello'],$connection) or die("Error selecting the database");

?>

 

</body>

</html>

 

 

can someone tell me what this error means? and how can i solve the error?

 

 

Link to comment
https://forums.phpfreaks.com/topic/49929-connect-php-to-ms-sql-database/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.