Hello,
I have a server, which i can ping and is on the network, with an sql database on it which i'm trying to connect to.
the server i'm initially on is an Apache with only php 5 on it.
do i need to enable or install anything on the PHP 5 server to recognise the mssql functions? any help would be really appreciated.
to connect to the sql database i'm using the code below:
firstly the script errors saying: fatal error: call to undefined function mssql_connect()...............
if (function_exists('mssql_connect'))
{echo "yes";}
else
{echo "no";}
$myServer = "10.16......";
$myUser = "********";
$myPass = "********";
$myDB = "Pod1View";
// connect
$cs = mssql_connect ( '*********', '********', '********' )
or die ( 'Can not connect to server' );
// select
mssql_select_db ( '[Pod1View]', $cs ) or die ( 'Can not select
database' );
//query
$sql = "SELECT * FROM [bRANCH]";
$r = mssql_query ( $sql, $cs ) or die ( 'Query Error' );
// loop the result
while ( $row = mssql_fetch_array ( $r ) )
{
/* do stuff */
}