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

    I am new and evaluating ModX for a project. I am seriously considering using this. However we cannot use Revolution version as it is not GA.

    I am looking for a way to be able to access MySQL with least coding.
    Is it possible to use xPDO for database access in Evolution?
    Has anyone done it and is it the right way to access database?

    Any other recommendation for database access?

    Cheers
    Amit
      • 22303 MODX Staff
      • 10,725 Posts
      It’s definitely possible, but the caveat is that you need two connections to the database since xPDO uses PDO and the Evolution core uses mysql extension. It would be better for efficiency to code Evolution stuff using the DBAPI, but again, you can use xPDO. If you are primarily using it to access core tables, definitely use the DBAPI.

      In Revolution this is not the case, since the core itself uses xPDO, you can use the same connection/instance of xPDO/PDO.
        • 1383
        • 5 Posts
        Thanks for your quick reply. This sounds great.

        Any chance you can provide me a pointer where to look.
        I am looking at xpdo.org and will try to figure out how to do this.

        I don’t mind two connections. I will try xPDO with Evolution.

        Thanks again
        Amit
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: amitjindal at Oct 29, 2009, 12:24 PM

          Thanks for your quick reply. This sounds great.

          Any chance you can provide me a pointer where to look.
          I am looking at xpdo.org and will try to figure out how to do this.

          I don’t mind two connections. I will try xPDO with Evolution.
          For a better documentation start, see http://svn.modxcms.com/docs/display/XPDO10/Home -- the xpdo.org website has been neglected while I’ve been working on MODx Revolution (but xPDO itself has not since it is an integral part of Revolution).
            • 28215
            • 4,149 Posts
            Or the eventual xPDO 2.0 which will be in Revolution RC1: http://svn.modxcms.com/docs/display/XPDO20/Home
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com