Thanks! This gives me something to try. I also found this in the wiki pages:
http://wiki.modxcms.com/index.php/Access_another_database_from_MODx
I don’t want to add the tables to the modx database... I see that database as potentially volatile if I do any upgrades, but also from a security standpoint: the MODx app is granted the God user to that database. Any data in there could be read/altered/deleted in ways I didn’t intend. For another form I made for interacting with my other database, I just had a Snippet that used an include(’../lib/my_non-modx_code.php’) to handle interactions with this other database. It’s a bit weird when you start using MODx for *some* but not all of your code... I’ve run into that with CSS files, too... do you create a document for them and [~ref~] them? Or do you put them in the assets folder? I suppose it’s a matter of preference.
I’m hesitant to modify the source code for the same upgrade reasons as indicated before, but this sounds like a worthy trade-off... I wonder if I can get in there to mitigate the "God User" effect? E.g. if I’m only SELECTING data, can I point MODx to use a MySQL user that only has SELECT privileges (and thus reduce the risk of bad things happening due to SQL injection / XSS)?
I’m also guessing that I may have to add a user by the same name/password to my other database, but that wiki link had a way of handling that... it just may not work within the context of the @SELECT binding.
Thanks for all the replies!