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
-
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.
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