ohh, here,
//call to included function
$mysql_query = searchQuery('y', $location, $locimplode, $query, $city, "search");
if ($by == "title") {
$mysql_query= $mysql_query ." ORDER BY Resume.resumeTitle";
} else if ($by == "contact") {
$mysql_query= $mysql_query ." ORDER BY Resume.stateLocation";
} else if ($by == "date") {
$mysql_query= $mysql_query ." ORDER BY Resume.datePosted";
}
if ($by && $byBack) {
$mysql_query= $mysql_query ." DESC";
}
if ($by && !$byBack) {
$reverse = "&byBack=1";
//print "BY IS $by\n";
}
$godsult = mysql_query($mysql_query, $db);
//echo $mysql_query;
$total = mysql_num_rows($godsult);
$one = $displayLocation + 1;
$two = $displayLocation+$displayInterval;
if ($two > $total) {
$two=$total;
}
$pages = ceil($total/$displayInterval);
$mysql_query=$mysql_query." LIMIT $displayLocation , $displayInterval";
// print $mysql_query;
$result = mysql_query($mysql_query, $db);
if (mysql_num_rows($result)) {
print "<center>Search Results $one-$two of $total<br><br>";
//the return value of $total is a number with a "+"
if ($pages>1) {
for ($ll=1;$ll<=$pages;$ll++) {
$bc=($ll*$displayInterval)-30;
print "<a href='/basephp/diversity/search.php?viewAll=$viewAll&query=$query&displayInterval=$displayInterval&displayLocation=$bc'>[$ll]</a>";
}
}