WordPress.org

Ready to get started?Download WordPress

Forums

Questions to an external mssql-database (6 posts)

  1. jempan75
    Member
    Posted 3 years ago #

    Hello!
    I am just getting started with WordPress and I have a customer asking for a new website. On that website they want a connection to an external application with data on mssql.

    This might be more of an sql-programming issue than a WordPress-issue, but I have to start somewhere. I know that WordPress is running mysql so I wonder if there will be a conflict.

    My next question is: do you think I can do this myself or do I have to hire a web programmer (sql-programmer). I know html and css, but not sql. Although I have enough knowledge to manage and understand ready scripts in several language even though I cant make them myself.

  2. jempan75
    Member
    Posted 3 years ago #

    A little addition:

    It is quite a simple thing. It requirers only a search field and a question to the database to retrieve a few lines of data.

  3. vatodorov
    Member
    Posted 3 years ago #

    Hi jempan75,

    Did you figure it out? I am trying to do something similar, but couldn't find anything on the topic in the forums.

    thanks,
    Valentin

  4. dholowiski
    Member
    Posted 3 years ago #

    It should be fine. WordPress typically connects to mysql on localhost, and your php script will have the other mssql server address in it's configuration. The script wi connect to whatever server is specified in the script, and the two will be completely separate,as long as the script doesn't try to connect to localhost or 127.0.0.1.

    This implies that the mssql server is available on the Internet. If so it better be secured and locked down like crazy. If the customer is expecting you to do this, better hire someon to do it.

  5. vatodorov
    Member
    Posted 3 years ago #

    Thanks. This is my own project so it is not for a customer.

  6. whiteatom
    Member
    Posted 3 years ago #

    The language you need to know is PHP not SQL.. sql is easy, you can figure out basic statements to grab data in no time - especially with some googling.

    A note for you.. when you get to creating the connection in PHP, make sure you force mysql_connect to create a new connection (TRUE on the last parameter) and you'll never have a problem. I had an issue where I was closing my connection before wordpress was finished, and all the wordpress queries after my plugin was called failed.

    So store your link resource in a variable and pass it back to your mysql_close - good practice anyway, but essential when you have multiple connections.

    Cheers,

    whiteatom

Topic Closed

This topic has been closed to new replies.

About this Topic