After you run the query, do something like this...
<?php
$result = mysql_query($sql) or die('Couldn\'t handle it: ' . mysql_error()); // $sql here is your query
// Handle your conditional
if (mysql_num_rows($result)) {
// There are rows, include the file for having rows
} else {
// There are no rows, include the file for having no rows
}
?>
This is very stripped down logic, but it is a starting point for you.
--
Robert A. Gonzalez