I'm having trouble displaying results when i connect to 2 databases. My connection script seems to be working fine and returns no errors;
$connect1 = mysql_connect("localhost","user","pass", true);
$connect2 = mysql_connect("localhost","user","pass", true);
$db_selected = mysql_select_db("database1", $connect1);
$db_selected = mysql_select_db("database2", $connect2);
When i run the queries, however, I'm only managing to get the results from database1 and nothing from database2, not even any errors.My query codes look like;
$query = "select * from tableA";
$result = mysql_query($query, $connect1) or die(mysql_error());
$query = "select * from tableB";
$result = mysql_query($query, $connect2) or die(mysql_error());
Have i gone about this the wrong way? Any help or guidance would be greatly appreciated.