<![CDATA[ Custom Database Interactions - My Forums]]> https://forums.modx.com/thread/?thread=28856 <![CDATA[Re: Custom Database Interactions]]> https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155230 ]]> debussy Aug 14, 2009, 12:33 AM https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155230 <![CDATA[Re: Custom Database Interactions]]> https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155229 opengeek Aug 14, 2009, 12:19 AM https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155229 <![CDATA[Re: Custom Database Interactions]]> https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155228
I’m going to take a stab in the dark, and guess that the caching mechanism is storing these files in Western-Roman encoding instead of UTF-8 which is where the special characters are getting dropped. ... but I’m probably wrong.

Am I using PDO wrong? Did I miss some setting in MODx? Any tips?]]>
debussy Aug 13, 2009, 06:46 PM https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155228
<![CDATA[Re: Custom Database Interactions]]> https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155227 ]]> debussy Aug 13, 2009, 04:53 PM https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155227 <![CDATA[Re: Custom Database Interactions]]> https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155226
http://www.php.net/pdo]]>
opengeek Aug 13, 2009, 03:57 PM https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155226
<![CDATA[Re: Custom Database Interactions]]> https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155225
MODx is built on the ORM xPDO:

http://svn.modxcms.com/docs/display/XPDO10/Home

It has much more features than the old DBAPI of Evo. It does require you though to build the schema as outlined in the tutorial I posted above.]]>
splittingred Aug 13, 2009, 03:33 PM https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155225
<![CDATA[Re: Custom Database Interactions]]> https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155224

To quote a couple of spots on the page:
...You’ve got some data that uses a table in your MODx database, but you want a way to use xPDO’s object model to access it....
table - This should point to the actual database table name, minus the prefix.
I have a whole separate database I’m trying to access, plus, these instructions seem like overkill for what I’m doing. Does Revolution have just some equivalents to the old modx->db functions I listed above?]]>
debussy Aug 13, 2009, 03:26 PM https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155224
<![CDATA[Re: Custom Database Interactions]]> https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155223 http://svn.modxcms.com/docs/display/revolution/Using+Custom+Database+Tables+in+your+3rd+Party+Components]]> splittingred Aug 13, 2009, 03:03 PM https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155223 <![CDATA[Custom Database Interactions]]> https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155222 would someone please help me find some info/instructions (simple examples would be wonderful) on how to connect to my own custom database through Revolution? embarrassed

What I’m doing isn’t all that complicated (I think). In Evolution I have been using:

  • $modx->db->escape(string);
  • $modx->db->connect(host, database, user, pass);
  • $modx->db->disconnect();
  • $modx->db->query(sql);
  • $modx->db->getRecordCount(result);
  • $modx->db->getRow(result);

It appears as if there are plenty of resources to tell me how to use xpdo to pull data from the modx database, but, again, I need to access some custom databases. Any help getting me in the right direction would be much appreciated! grin
]]>
debussy Aug 13, 2009, 02:42 PM https://forums.modx.com/thread/28856/custom-database-interactions#dis-post-155222