hjeko
Member
Posted 11 months ago #
Hello,
I really like WordPress and I would like to use it on my next project.
Here it is:
- We want to have a site with first page a search
- Second page is the list of results from the search
- Third page is the page for a specific database entry that is hosted on a different mysql db (more than 500,000 entries)
- Fourth page is an error page
I am not sure how to set that up through wordpress. I am scared to put all db entries on the wordpress install. That's why it's in a different DB.
Any thoughts on how to make that work and make it SEO friendly?
Thanks!
JMT
jonradio
Member
Posted 11 months ago #
To access a database other than the WordPress database, you simply grant your WordPress Database ID SELECT access to your other database. Then you code your query like this in PHP:
global $wpdb;
$wpdb->select('ebc');
$memberlist = $wpdb->get_results('SELECT * FROM people WHERE member ORDER BY namelast');
$wpdb->select(DB_NAME);
That last line is essential or WordPress will fail almost immediately after.
hjeko
Member
Posted 11 months ago #
Hello jonradio,
Thanks for your reply.
Ok so after granting access to the other database, how do I set up search to this other database? What about getting access to results?
and when I access an entry, how can I customize the entry?
I am still new to this and I want to make sure this is simple and efficient.
Thanks for your help!
JMT
jonradio
Member
Posted 11 months ago #
hjeko
Member
Posted 11 months ago #