My task is to take data from different databases in different server and to display them in a single web page.I am working in joomla and i am able to take data from the databases using separate queries for each database.But the problem is that i need to give sorting and pagination to this web page. how can i do this without making any performance issue since all the databases contains a lot of data. Or can i use a single sql query for this ??
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
To do what you're describing in Joomla I would recommend the Fabrik extension. It lets you create fairly complex front-end visualizations and table views of database data, as well as search forms and single-page table views that have nice ordering/sorting/per-column filtering controls.
More importantly, Fabrik lets you set up connections to multiple databases. Once you've set up all your database connections in Fabrik, you can then import and configure those tables in the Fabrik back-end, and after that they are all treated the same by the other parts of the administrative interface.
In other words, you can create front-end table views or search forms in the Fabrik back-end, which can do things like table joins across multiple database connections, or pre-filter result sets of a table from one database using data stored in another database (among other things) and Fabrik will take care of creating and closing the necessary database connections for you.
You can use a GET parameter to use pass the page that you want to view, and the offset will be calculated from that.
You will have to integrate it with your code, to make it work better of course.