When I run an UPDATE query using $wpdb, WP prepends the database name associated with the WP installation to whatever is passed in the table name argument.
This isn't desirable as my app passes the full path to the table (ie. databasename.table). In the end, what happens is the table name ends up looking like databasename.databasename.table, causing my query to fail.
Is there a way to stop this? I realize I can open a new $wpdb connection to run queries on a different database but I want to use the same connection. SELECT work fine this way, it's annoying that the behavior for UPDATE is different.
$wpdb->update(
"database.table",
array(
'm_title' => $post->post_title,
),
array( 'id' => $game->id ),
array(
'%s',
)
);