SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard
    Join Date
    Apr 2004
    Location
    dublin
    Posts
    2,036
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP + ODBC Connection

    Hi all,

    Could someone please explain to me how to connect to MS SQL Server Database with PHP.

    How does ODBC work and how is it actually setup?

    Thanks.

    Kevin.

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by obrienkev
    Could someone please explain to me how to connect to MS SQL Server Database with PHP.
    Check out mssql_connect(), mssql_select_db() and mssql_query(). Post back if you want code examples. Have to go now...

    -Helge

  3. #3
    SitePoint Wizard
    Join Date
    Apr 2004
    Location
    dublin
    Posts
    2,036
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How do I create an ODBC with SQL Server?

  4. #4
    SitePoint Zealot
    Join Date
    Dec 2004
    Location
    New Castle, PA
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think you need one, PHP comes bundled with functions to connect to MSSQL. You just have to make sure your user has permissions to access the DB. I could never get it to work at home using the desktop version of SQL, but I had to write some stuff for a client to query MSSQL, so I figured I'd try it with PHP, and it worked the first time :-) Helge gave a listing of the main functions above, and I believe the connection strings are set up pretty much the same as they are for MySQL


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •