MS-SQL from Linux Server through PHP

H.S.Rai hardeep.rai at
Sat Mar 29 17:32:12 UTC 2008

On following this:

by doing:

./configure --with-tdsver=8.0
sudo make install

tsql -S -U username

works fine,

I was able to have connection to MS-SQL using code like:

        $myconn = @mssql_connect ($server,$user,$password);
        if(!$myconn) { echo ("<br>Can't connect MS SQL Server,"); exit();}
        { echo "Can´t connect Database"; exit();}
        /*** Succesful Connection ***/

But following line gave error:

        $sql = "SELECT * FROM tbl_AP";
        $res = mssql_query($sql,$myconn); // Line ID 123: Give error

You selected file a.php to download. If I comment line ID 123 above,
php works fine, but with that line there it behave like PHP is not
working with Webserver. The result is same $res =
@mssql_query($sql,$myconn);  i.e with symbol "@" used.

Please help.



More information about the ubuntu-users mailing list