We are trying to pull data from a second database into Wordpress. The secondary database is used internally to store data, and Wordpress (also only used internal) is partially used to display some of this data.
I did not find a reliable way to install Wordpress on SQL Server and thus decided to install it separately on MySQL (as intended) and pull in the extra required data from SQL Server.
UPDATE statement are also expected to be needed.
After some research online the 'best' I could find was to integrate a second ezSQL with a connection to the SQL Server.
Can I just use the default ezSQL 'configuration'?
Is this even possible, without resulting in compatible / interference issues?
$db = new ezSQL_sqlsrv($db_user, $db_password, $db_name, $db_host); $current_time = $db->get_var("SELECT " . $db->sysdate() . " AS 'GetDate()'");
$wpdbtest_maindb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST); $current_time = $wpdbtest_maindb->get_results("SELECT " . $db->sysdate());