mysql sorgusu

$check=mysql_num_rows(mysql_query("select username,email from users where username='$username' or email='$email'"));

if($check > 0):
$error[1]='Kullanıcı adı veya email adresi kullanılıyor.';
endif;