I have two databases and since there have to separate users for each database, I used this approach:
PHP Code:
$con1 mysql_connect("www.mysite.com","user1","password") or die(mysql_error());
$con2 mysql_connect("www.mysite.com","user2","password") or die(mysql_error());

mysql_select_db("db1",$con1) or die(mysql_error());
$aquery "SELECT * FROM invest";
$result1mysql_query($aquery) or die(mysql_error());
$ct1 mysql_num_rows($result1);

mysql_select_db("microx",$con2) or die(mysql_error());
$bquery "SELECT * FROM general";
$result2 mysql_query($bquery) or die(mysql_error());
$ct2 mysql_num_rows($result2); 
The error that is showing up on the site is "No database selected".
Am I wrong in connecting to the database both at the same time or is something else wrong?