public static function get_searched_query_data($filter_name = null, $successful = true) { if ($successful) { $where_condition = 'hits > 0'; } else { $where_condition = 'hits = 0'; } if (!is_null($filter_name)) { $where_condition .= ' AND '; $where_condition .= self::get_between_date_condition_by_filter_name($filter_name); } return ES_List_User_Searches_Database::get_data($where_condition); }