try
“WP_Tables does not directly support custom SQL queries, However if you use phpMyAdmin to create a view, then WP_Tables can display that view.”
Hello @terrence-lp,
Thank you for the question.
To run the query for the different databases on the server, please make sure that the MySQL user for wordpress db also has read permissions for other databases you want to access. It can be done by using PhpMyAdmin or GRANT statement.
Hope it helps.
Regards,
Ian
Hello,
Great Plugin – Needs a Filter feature! Like Filter By (what ever we have in the columns)
But to answer the ‘USE DB’ what I was able to do was set up MySQL permissions so my WP User also has access to the other or External DB.
From there I just call the DB like so –
SELECT article.id, SUM(article_text.word_count) as total_words
FROM master_media.article
As long as that is specified it all works great!
I’m even using SUM, JOINS, GROUP BY and ORDER BY’s all in the same query and works great .
-
This reply was modified 8 years, 3 months ago by
Terrence LP.
Hello @terrence-lp,
I am glad to hear it works.
As for the filtering feature, I see many requests for that, so I will try to prioritize the development.
Thanks,
Ian