I have 3 username, ie: usernameA,usernameB,usernameC. And I have also their email in a table, ie: usernamea@gmail,usernameb@gmail,usernamec@gmail. I don't know how to get these emails at once from that 3 username. I can do it by this:
$q=mysql_query("SELECT email FROM t_un WHERE username='usernameA'");
$f=mysql_fetch_object($q);
$emailA=$f->email;
$q=mysql_query("SELECT email FROM t_un WHERE username='usernameB'");
$f=mysql_fetch_object($q);
$emailB=$f->email;
$q=mysql_query("SELECT email FROM t_un WHERE username='usernameC'");
$f=mysql_fetch_object($q);
$emailC=$f->email;
but that's uncomfortable for me. Is there any better way to get that emails from 3 username at once in SQL? thanks.