$res = $mysqli->query("SELECT `id` FROM `users` WHERE `email` = '$email_1'");
$row = $res->num_rows;
if ($row > 0){
message('Этот E-mail занят');
if(mysqli_num_rows($mysqli->query("SELECT `id` FROM `users` WHERE `email` = '$email' ")) > 0){
message("Email занят");
}
"SELECT COUNT(id) as count FROM users WHERE email = ? LIMIT 0,1"
$mysqli = new mysqli(SERVER, DBUSER, DBPASS, DATABASE);
$result = $mysqli->query("SELECT `id` FROM `users` WHERE `email` = '$email' ");
if($result->num_rows == 0) {
// НЕТУ.
} else {
// ЕСТЬ.
}
$mysqli->close();