Code: Select all
mysql_select_db("timetracker");
$searchoption = '';
#echo $searchoption;
#Determine how many candidates match the criteria
$query = "SELECT * FROM time WHERE association = '".$association."' ".$searchoption." ORDER BY full_date DESC";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
if ($num_results == 0)
{
echo "<b>There are no candidates that meet your criteria</b>. Please your back button and broaden your search.";
}
elseif ($num_results == 1)
{
echo "<b>There is one candidate that meets your criteria</b>. ";
}
else
{
echo "<b>There are ".$num_results." candidates that meet your criteria</b>. Results are sorted by submission date - the most recent submissions are at the top.";
}