Best way to check if record exists or not in MySQL
You could probably reduce this to 2 queries with something like:

select * from table where date_field between date1 and date2 ; 
set @count = found_rows()
if @count = 0 then
    select * from table order by date_field desc limit 0,20 ; 
end if ;