Hi, I am new in PHP. I have tried to connect MSSQL 2005 through php.
I am using xampp 1.8.0
But once run, error msg is "Fatal error: Call to undefined function mssql_query()".
I have copied "php_mssql.dll" in PHP folder and enable in PHP.ini as "extension=php_mssql.dll "
and also tried copied in PHP/ext folder also (all above got from forum PHP Freaks Previous topics)
But nothing happened. Same error appear. Can anybody help?
Pls Help me.
Below is code. I am running xampp in my local mechine with Win 7 pro
It is config.php
<?php
$myServer = "sils-pc";
$myUser = "sa";
$myPass = "544Hjy%2*2";
$myDB = "tempDB";
$conn = new COM ("ADODB.Connection") or die("Cannot start ADO");
$connStr = "PROVIDER=SQLOLEDB;SERVER=".$myServer.";UID=".$myUser.";PWD=".$myPass.";DATABASE=".$myDB;
$conn->open($connStr);
?>
<?php
include 'config.php';
$query = "SELECT * FROM vw_Film_Certs_Display order by id";
//$query = mssql_query('SELECT * FROM [php].[dbo].[vw_Film_Certs_Display]');
$result = mssql_query($query);
$numRows = mssql_num_rows($result);
echo "<h1>" . $numRows . " Row" . ($numRows == 1 ? "" : "s") . " Returned </h1>";
while($row = mssql_fetch_array($result))
{
echo "<li>" . $row["id"] . $row["name"] . $row["year"] . "</li>";
}
mssql_close($dbhandle);
?>
Please help me