  ...
if !zip_code.empty? 
  conditions_sql << "miles_between_lat_long( 
    (select latitude from zip_codes where zip = ?), 
    (select longitude from zip_codes where zip = ?), 
     latitude, longitude) < 15" 
  conditions_vars.concat [zip_code]*2 
end 
  ...
psts = Physical::MovieShowtimeWithCurrentAndSoldOut.find(:all, 
  :select => [:id, :movie_id, :theatre_id, :latitude, :longtitude], 
  :include => [:movie, :theatre, 
  :conditions => [conditions_sql.join(" and "), *conditions_vars])


