connect to db (gunz web)?

Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    In Progress... FFXIV... Anju is offline
    MemberRank
    Oct 2010 Join Date
    Mist Ward 7 #38Location
    1,946Posts

    Re: connect to db (gunz web)?

    I was talking about your config.php or whatever that had the configuration for your website.

  2. #17
    Member AijdManiacs is offline
    MemberRank
    Feb 2011 Join Date
    83Posts

    Re: connect to db (gunz web)?

    already posted that :p
    try
    {
    $bdd = new PDO('mysql:host=PC-NAME/SQLEXPRESS;dbname=GunzDB', 'sa', 'password');
    $bdd->exec("SET CHARACTER SET utf8");
    }
    catch (Exception $e)
    {
    die('Erreur : ' . $e->getMessage());
    }

    also tried PC-NAME\SQLEXPRESS with this slash \

  3. #18
    • ♠️​ ♦️ ♣️ ​♥️ • שเ๒єtгเ๒є is offline
    MemberRank
    Mar 2012 Join Date
    917Posts

    Re: connect to db (gunz web)?

    Quote Originally Posted by aijdmaniacs View Post
    yeah sure
    Spoiler:
    Code:
    [ spoiler ]put your endless crap shit, i mean php.ini here ...[/ spoiler ] // without spaces ...

  4. #19
    In Progress... FFXIV... Anju is offline
    MemberRank
    Oct 2010 Join Date
    Mist Ward 7 #38Location
    1,946Posts

    Re: connect to db (gunz web)?

    From the looks of your configuration, you're trying to connect to a MySQL database while your GunzDB is MSSQL.

    Code:
    $bdd = new PDO('mysql:host=PC-NAME/SQLEXPRESS;dbname=GunzDB', 'sa', 'password');
    I wouldn't try to use "mssql" as a replacement in that red text above. But someone said something about uncommenting something from "extension=php_pdo_mssql.dll" line from your php.ini. Have not tried this yet. Care to test it out if you wish. It seems to be a lot of work to get PDO to work with MSSQL instead of MySQL.



Page 2 of 2 FirstFirst 12

Advertisement