Timeline for Using wpdb to connect to a separate database
Current License: CC BY-SA 2.5
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 13, 2015 at 10:58 | comment | added | M-R |
Set WPDB prefix to make WP_Query and get_post to generate correct sql query by calling $second_db->set_prefix('wp_');
|
|
Sep 11, 2010 at 20:55 | comment | added | jerclarke | This is somewhat redundant to Wadih's answer but I think my code example is a bit clearer and its also important to remember the db login constant's as they are almost always the right ones to use and otherwise you risk issues when moving from dev->stage->live environments where the login details might change. | |
Sep 11, 2010 at 20:53 | history | answered | jerclarke | CC BY-SA 2.5 |