Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: PHP + MsSQL

  1. #1

    Default PHP + MsSQL


    Mga master? unsay mga paagi para ma connect nako ang duha? nag dagan na ang akong mssql Through SQL Express 2005.. any suggestions?

  2. #2

    Default Re: PHP + MsSQL

    Sure ko mag ask mo nganu MSSQL ako gi pares sa PHP...


    ani na xa.. Gipaconvert mi ug website from COLDFUSION + MsSQL to PHP + MsSQL


    im not new to MsSQL pero .NET man to akong gamit oy.. hahaha

    mssql_connect sab kay dili maka connect..


  3. #3

    Default Re: PHP + MsSQL

    try daw use ug PDO bro...basin sayop imong connection string...

  4. #4

    Default Re: PHP + MsSQL

    You can use the mySqli or PDO but I would suggest using PDO because it offers exceptions where you can put it in try catch. PHP Data Objects is included with PHP 5.1, provides OOP interface. It also provides a consistent interface that's portable between other database servers such as Oracle, DB2, MS SQL Server, and PostgreSQL. The code looks like this,

    Code:
     
    try {
    
         $db = new PDO($dsn, $username, $password, $options);
    
    }catch (PDOExceptions $e) {
    
         $error_message = $e->getMessage();
         exit;
    }
    Where your $dsn should look like this "sqlsrv:server=hostname_or_ip;Database=database_na me;"

    As for the "$options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION);"

    Hope this help...

  5. #5

    Default Re: PHP + MsSQL

    Quote Originally Posted by ingkiang View Post
    try daw use ug PDO bro...basin sayop imong connection string...
    dili nia mabasa ang function nga mssql_connect taya hasola ane oy

  6. #6

    Default Re: PHP + MsSQL

    post daw sa error message bro...

  7. #7

    Default Re: PHP + MsSQL

    try daw check if na load nimo ang driver?..padagani ug phpinfo daw

  8. #8

    Default Re: PHP + MsSQL

    Quote Originally Posted by ingkiang View Post
    post daw sa error message bro...
    mao ning error Call to undefined function mssql_connect() in C:\xampp\htdocs\eodev\test.php






    nag try kog Uncomment sa mga mssql sa php.ini. tas ga download kog .dll para sa mssql dili man gihapon.. dili ba kaha ni sa OS? win 7 here.

  9. #9

    Default Re: PHP + MsSQL

    Quote Originally Posted by ondoy View Post
    try daw check if na load nimo ang driver?..padagani ug phpinfo daw
    naka DL nakog .dll para sa mssql. then pag phpinfo nako wala may mssql.

    unsay lain paagi ani?

  10. #10

    Default Re: PHP + MsSQL

    Quote Originally Posted by choco.cheese View Post
    naka DL nakog .dll para sa mssql. then pag phpinfo nako wala may mssql.

    unsay lain paagi ani?
    adto sa php.ini na file bro, then e uncomment ang mssql.dll na extension...kuhaa lang ang semicolon

    sample
    ;extension=php_mssql.dll --> extension=php_mssql.dll
    ;extension=php_pdo_mssql.dll --> extension=php_pdo_mssql.dll

  11.    Advertisement

Page 1 of 2 12 LastLast

Similar Threads

 
  1. MSSQL + PHP in window server 2008 IIS 7 request
    By Burn Out in forum Programming
    Replies: 4
    Last Post: 08-15-2012, 05:26 PM
  2. IIS 7 + PHP with MSSQL
    By Burn Out in forum Websites & Multimedia
    Replies: 2
    Last Post: 07-23-2012, 01:39 AM
  3. PHP and MSSQL Help
    By bolivar1985 in forum Programming
    Replies: 3
    Last Post: 10-22-2009, 03:42 PM
  4. PHP vs ASP?
    By MyGIRBAUD`DotCom in forum Websites & Multimedia
    Replies: 42
    Last Post: 12-08-2005, 07:03 PM
  5. PHP syntax!!!! syntax!!!! Syntaxx!!!! any... any... any
    By dodie in forum Websites & Multimedia
    Replies: 46
    Last Post: 08-19-2005, 03:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top