Jump to content

Recommended Posts

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 */

}

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.