Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Good morning everyone,

Does couch have a way of connecting to a second database and extracting data from it? It's a pre-existing db not managed by couch & on another server.
Or does it make it easier/more secure to achieve this using couch rather than setting up a regular PDO?
Thank you!
Hi,

Couch uses the $DB global object to access its own database.
If you need to access another database, *don't* use $DB.

Apart from that, I think, you should be fine using any method available with raw PHP.
You can study code samples of SQL to query other database with cms:query here: viewtopic.php?f=8&t=11085&hilit=Database+tool#p28779
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
3 posts Page 1 of 1