can anyone help me out on how to establish connection to two databases using database class in same file ?
Not sure exactly how your class works but you would need to provide 2 sets of credentials and instantiate the class 2 times. $db1 = new DbClass(DATBASENAME,USER,PASSWORD,HOST); $db2 = new DbClass(DATBASE2NAME,USER2,PASSWORD,OTHERHOST); PHP: It really depends on how the class is organized, but it should look something like this.