We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34499
    • 4 Posts
    Brief Background: I have a site that is driven by a DB but has not separation of design, code, logic...nothing. I’m trying to bring that site into ModX so there will be some content management and allow users to create content rather than me logging to duplicate the code and copy/paste the content.

    Current Issue: This whole conversion hinges on being able to connect to the existing DB (MySQL) where the information is located (ModX is installed in it’s own DB). I’ve been reading about the xPDO but I’m not sure if I’m on the right path. Is there a simple tutorial or post that outlines getting started with connecting to a database? I know it sounds rudimentary (which I’m new to this) but just making a simple connection to my DB is becoming an issue.
      • 34084 ☆ A M B ☆
      • 756 Posts
      You might check out this post: http://modxcms.com/forums/index.php?topic=57631.0

      cheers
        Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
        Visit CharlesMx.com for latest news and status updates.
        • 33968
        • 863 Posts
        What’s in your foreign db... is it just data or are you hoping to pull in your content from there?

        If it’s the latter you might be better off just importing it all into MODx.
          • 34499
          • 4 Posts
          the foreign db is just the existing content and user info. i was also curious about LDAP since that is what I’m using for the authentication.
            • 33968
            • 863 Posts
            If that’s the case and if we’re talking about a reasonably low number of resources, then I honestly think importing your content into MODx is the way to go. It will be much simpler to work with existing add-ons and the built in access controls if you do it that way.

            You can use ImportX to assist with this.
              • 34499
              • 4 Posts
              Thanks for the feedback. I’ve setup to test site with both scenarios to see which would work better. Unfortunately, I’ve been stuck on learning how to query the database...or even connect to it for that matter.
                • 32316
                • 387 Posts
                  • 3749
                  • 24,544 Posts
                  You might find some useful info in this thread: https://forums.modx.com/index.php?topic=59998.0.


                  ---------------------------------------------------------------------------------------------------------------
                  PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
                  MODx info for everyone: http://bobsguides.com/modx.html
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting