We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15392
    • 61 Posts
    Hi,

    I would first to congratulate everyone who is evolved in this new (beta) release, it truly looks great.
    I am exited about trying it, specially the connection with MS SQL server, but, I cannot find HOW to do that. How does modx 2.1 connects to mssql? What snippet/code/function do I have to use? I looked everywhere but didn’t find.

    I’m sure I’m going to feel really stupid after the first answer, if anyone has enough patience for newbies like me.

    Thank You,
    SC.
      • 17249 ☆ A M B ☆
      • 165 Posts
      Guess most evident usage is in a fresh installation.
      Instead of a mySQL table you simply put the details of a prevoiusly created MSSQL table to work with.

      Now we, windows server users with MSSQL for example can make MODx Revolution websites.
        • 15392
        • 61 Posts
        Oh,

        So I guess its not possible to connect to a remote sql server like I normally do outside modx:
        -----------------------------
        <?php
        $connection = mssql_connect("[ip adress]","[username]","[password]");
        $db_select = mssql_select_db("database", $connection);
        if (!$db_select) {
        die(’Something went wrong while connecting to MSSQL’);
        }
        ?>
        ----------------------------

        I know you can use:
        $modx->db->connect(’123.45.6.7’, ’mydb’, ’user’, ’password’, true);
        for mysql.

        What I would like to do is build a snippet that connects to a mssql so that I could fetch data in designated pages.

        Thanks.
        SC.