Is it possible to simplify this query to 1 query to save system resources?
<?php
$president_sql = "SELECT * FROM `tbl_officers` WHERE `year` = '".$year."' AND `position` = 'President' LIMIT 1";
$president_query = mysql_query($president_sql) or die(mysql_error());
$president_row = mysql_fetch_array($president_query);
echo "President - $president_row['name'] <br>";
$vice_president_sql = "SELECT * FROM `tbl_officers` WHERE `year` = '".$year."' AND `position` = 'Vice President' LIMIT 1";
$vice_president_query = mysql_query($vice_president_sql) or die(mysql_error());
$vice_president_row = mysql_fetch_array($vice_president_query);
echo "Vice President - $vice_president_row['name'] <br>";
$secratary_sql = "SELECT * FROM `tbl_officers` WHERE `year` = '".$year."' AND `position` = 'Secratary' LIMIT 1";
$secratary_query = mysql_query($secratary_sql) or die(mysql_error());
$secratary_row = mysql_fetch_array($secratary_query);
echo "Secratary - $secratary_row['name'] <br>";
$treasurer_sql = "SELECT * FROM `tbl_officers` WHERE `year` = '".$year."' AND `position` = 'Treasurer' LIMIT 1";
$treasurer_query = mysql_query($treasurer_sql) or die(mysql_error());
$treasurer_row = mysql_fetch_array($treasurer_query);
echo "Treasurer - $treasurer_row['name'] <br>";
?>
I want the president of the given year, $year, to be listed first, then the vice president, so on and so forth. How do I do this in SQL? If not, is there a way I can do this in PHP?
Thanks.