PHP, MSSQL extensions connecting to SQL SERVER 2000

  • Could anyone post me an examle of how to connect using mentioned technologies.

     

    Cheers!!

  • Does this help?

    http://www.php.net/manual/en/ref.mssql.php

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Yes it does, thank you! But I can't figure out how to connect to the database without setting up a odbc driver first in Data Sources. I don't want to connect with the odbc driver.

  • To be honest, I don't know. Best bet I can give you is to look after the user contributed notes in http://www.php.net/manual/en/function.mssql-connect.php 

    I once tried to connect to SQL Server using php, but couldn't get it to work. I know that other members here were more successful.

    I only know how to use it to connect to MySQL, but that's another case. 

    Not a satisfying answer, I know, but I hope it helps.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • No worries mate, thanks anyway!

  • This is how i did it, hope this helps.

    $myServer = "ip address of server";

     $myUser= "DBUsername";

     $myPass = "DBPassword";

     $myDB = "DBName";

     $connection = mssql_connect($myServer, $myUser, $myPass) or

      die("Couldn't open a connection to the server $myServer");

     $database = mssql_select_db($myDB, $connection)

        or die("Couldn't open database $myDB");

  • Cheers mate, it did help!!!!!!!!

     

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply