-
☆ A M B ☆
- 24,524 Posts
Just use it in your code. MODx doesn’t really care what you use in your scripts; you could use raw PHP mysql functions if you wanted to, although that is strongly discouraged, as eventually the whole back-end is going to get ported from its legacy dependence on MySQL to the ability to use different databases. So getting in the habit of using PDO, or even xPDO, would be a good thing for the long term.
You could use different databases for your custom data (MSSQL, Oracle, Postgresql etc), though.
The only thing to keep in mind is that PDO/mysql is only available natively when PHP is configured for it; that should be a warning in your documentation, since it’s usually pretty easy to do so if it’s not already done.
-
MODX Staff
- 10,725 Posts
Keep in mind though that in order to use PDO with MODx 0.9.x/1.0.x, you will be creating two connections to the database on each request that gets data via your PDO instance.
-
☆ A M B ☆
- 24,524 Posts
I thought the data was external to the MODx database? Wouldn’t that be the case anyway?
That is the question,
I have seen information from forum that some people use own tables inside MODx database or one external database to MODx.
I understand that it depends on the volume of the information. In my case, will be 4 or 5 tables (I am making the design).
What would be your recommendations about what would be the best option?
Tables inside MODx database or external database with PDO to MODx database
Also,
I have been from download that MODx Revolution only exist as beta release.
What general problems I would have if I use PDO standalone with MODx 0.9.6.3 while I wait for the MODx Revolution GA?
I want to give more information about my question....
1.- My database will be on the same MySQL server as the MODx database, and I want to use PDO standalone against API:DBAPI
2.- The database will have static data information, and E-Commerce.
Jason,
thank you so much for your information, and I hope that your important project, OpenExpedio (I have been reading about this), keep on growing up.
I am a new developer with MODx, and I have great prospects to apply MODx in an new interactive web site for that tourism people of my country and the world can convey and develop community projects.