Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Use multiple Databases (Read 682 times) previous topic - next topic

Use multiple Databases

Hi. How do i access multiple databases from PHPRad?
Apologies if this has been answered before.

I am currently resorting to using MariaDB CONNECT engine in order to centralize tables into 1 dB.
Clearly there is probably a better way.

Getting results form diffrent DB's is important for our use case in order to render graphs etc..
Any basic examples of how to integrate?

Thank you for your time.

Re: Use multiple Databases

Reply #1
@packetloss69‍ currently phprad only supports connecting to one database for a project. If you would want your project to connect to several databases you will have to write the code to handle that aspect yourself.

Re: Use multiple Databases

Reply #2
Hi Willvin,

We understand the limitation of this software. My need is this.

(1) I want to display a list from a table in a SQLSRV database.
(2) When i select a row in the list, i want to display the details of the row on another page and also display a list of rows from table in MySQL database

Allow me to give you a summary example:
(1) Doctor accesses the list of patient appointments (in SQLSRV)
(2) The details of the appointment are show in another page
(3) Below the details, list of medical visits (from MySQL Database) are then shown.

I this possible in PHPRad? Something gives me the feeling that this has to be done completely in custom code.

Re: Use multiple Databases

Reply #3
@murugappan‍ you can use the page component in page design to achieve what you want, by adding the medical visits list page as a subpage to the appointment details page.

 

Re: Use multiple Databases

Reply #4
@willvin what you saying is i can do this:

(1) Add main page for the detail
(2) then add a subpage for the list under the main page.

if that the is true, i see what you mean and i will try that. Still one question remains. Where do i add the code to connect to another database and how to do i get the details to the view, add, update and  delete pages.

I would be great if you could add a sample tutorial in YouTube showing this. I am sure many subscribers to PHPRad would like to know as well.