Use one WordPress database with multiple instances of one site

Turns out that instead of relying on the Database for a URL, you can set it in the config file, which solves the problem I was having, like so:

define('WP_SITEURL','http://jack.example.com/test_blog/');

and then I set use a different config file for the other instance.

soruce: http://codex.wordpress.org/Editing_wp-config.php#WordPress_address_.28URL.29