Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jul 2012
    Posts
    73
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Php 5.3 & ms sql

    Hi All,

    I'm trying to simply display data in a table from a MS SQL database..

    I've read that PHP5.3 is not compatible with MSSQL.. is this true?

    Surely there is a way to make this work..

    Any ideas or thoughts?

    -Steven

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    This is false; I believe what you read is the PHP mssql library, not communication with mssql server itself. You can use the PDO library or the sqlsrv library with the sql server as a replacement for the MSSQL library.
    Similar to the MySQL which is officially deprecated as well and will be removed in a future version.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    New Coder
    Join Date
    Jul 2012
    Posts
    73
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    This is false; I believe what you read is the PHP mssql library, not communication with mssql server itself. You can use the PDO library or the sqlsrv library with the sql server as a replacement for the MSSQL library.
    Similar to the MySQL which is officially deprecated as well and will be removed in a future version.

    Well that's good news..

    Would you mind pointing me in the right direction to use PDO or sqlsrvr libraries?
    I've been using PHP for quite some time, but i ALWAYS have done the same thing.. never ventured far from simple pages with stock libraries, etc etc..

    Much appreciated..

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Yep:
    http://ca3.php.net/manual/en/book.sqlsrv.php
    and
    http://ca3.php.net/manual/en/book.pdo.php

    In particulars, look for the use of the fetch functionality as they usually have every step to get there included. PDO will need to also provide it with a valid dsn string. You can find info for the SQL Server dsn here: http://ca3.php.net/manual/en/ref.pdo...connection.php
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #5
    New Coder
    Join Date
    Jul 2012
    Posts
    73
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Thanks a ton! I'll get started on this


  •  

    Posting Permissions

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