MS connect eoor
Posted: Mon Mar 15, 2010 9:29 am
Hi,
I want access data from MS-sql database.
I inatalled sql server 2005 express edition 2005 and WAMP.
Facing problem when I am making connection.
Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\mssqlmysql\config.php on line 8
Please help get it solve.
I wrote below for making connection..
<?php
$msServer = "192.168.2.16";//
$msUser = "user";
$msPass = "user@123";
$msDB = "AttendanceTesting";
//connection to the database
$mslink = mssql_connect($msServer,$msUser,$msPass)
or die("Couldn't connect to SQL Server on $myServer");
//select a database to work with
$msdb = mssql_select_db($msDB, $mslink)
or die("Couldn't open database $myDB");
//declare the SQL statement that will query the database
$squery = "select * from tblUser";
//execute the SQL query and return records
$result = mssql_query($query);
$numRows = mssql_num_rows($result);
echo "<h1>" . $numRows . " Returned </h1>";
?>
I want access data from MS-sql database.
I inatalled sql server 2005 express edition 2005 and WAMP.
Facing problem when I am making connection.
Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\mssqlmysql\config.php on line 8
Please help get it solve.
I wrote below for making connection..
<?php
$msServer = "192.168.2.16";//
$msUser = "user";
$msPass = "user@123";
$msDB = "AttendanceTesting";
//connection to the database
$mslink = mssql_connect($msServer,$msUser,$msPass)
or die("Couldn't connect to SQL Server on $myServer");
//select a database to work with
$msdb = mssql_select_db($msDB, $mslink)
or die("Couldn't open database $myDB");
//declare the SQL statement that will query the database
$squery = "select * from tblUser";
//execute the SQL query and return records
$result = mssql_query($query);
$numRows = mssql_num_rows($result);
echo "<h1>" . $numRows . " Returned </h1>";
?>