Forum Moderators: coopster
//see if the query returned anything ie > 'more than' 0 rows
if(mysql_num_rows($query) > 0){
//loop through the results
echo "Search conducted on: ";
echo date("l, F d, T h:i" ,time());
echo "<p>";
$result_rows = mysql_num_rows($query);
if($result_rows = 1){
echo '<div> ' . $result_rows . ' villa was found, here are your results:</div>';
(
else{
echo '<div> ' . $result_rows . ' villa(s) were found, here are your results:</div>';
}
//loop through the results
echo "Search conducted on: ";
echo date("l, F d, T h:i" ,time());
echo "<p>";
if(mysql_num_rows($query) == 1) {
echo '<div> ' . mysql_num_rows($query) . ' villa was found, here are your results:</div>';
}
else{
echo '<div> ' . mysql_num_rows($query) . ' villa(s) were found, here are your results:</div>';
}