Sql table help

hey what i want to do is have it so when people log in it also checks to see if the field admin either has a 1 or a 0. Thats not the important part thought what i need help with is the way it checks that field. This is what i have so far
$username= $_POST[‘username’];
mysql_connect($server, $db_user, $db_pass) or die (mysql_error());
$result = ($database, “SELECT ‘admin’ FROM $table WHERE username = ‘$username’”) or die (mysql_error());

where did i go wrong

i figured it out