I need to select the same table in multiple databases
My select looks:
$con = new PDO("mysql:host=localhost;dbname=[db1, db2, db3]", user, pass);
$atrib = $con->prepare("SELECT email, subdomainFROM users WHERE email = ?");
$atrib->bindParam(1, $email, PDO::PARAM_STR);
$atrib->execute();
if($atrib->rowCount() != 0) {
//do something
} else {
print "Not exist!";
}
$con = null;
I have databases in phpmyadmin
Does anyone have any solution to select from multiple databases?