MOTM/DotD Management

Manage and reset Man of the Match and Dick of the Day counts

{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} {% endfor %} {% endif %} {% endwith %}

Reset Controls

Use these controls to reset MOTM/DotD counts for specific fixtures or all data.

Reset Specific Fixture
Reset All Totals

Reset motmtotal, dotdtotal, assiststotal, goalstotal columns

Reset Everything

Reset all MOTM/DotD data including fixture-specific columns

Sync Totals

Update stored totals to match calculated values from fixture columns

Current MOTM/DotD Data

{% if motm_data %}
{% for date in fixture_dates %} {% endfor %} {% for player in motm_data %} {% for date in fixture_dates %} {% endfor %} {% endfor %}
Player # Player Name MOTM Total DotD Total Goals Total Assists TotalMOTM {{ date }} DotD {{ date }}
{{ player.playernumber }} {{ player.playername }} {{ player.calculated_motmtotal or 0 }} {% if player.motmtotal != player.calculated_motmtotal %} (stored: {{ player.motmtotal or 0 }}) {% endif %} {{ player.calculated_dotdtotal or 0 }} {% if player.dotdtotal != player.calculated_dotdtotal %} (stored: {{ player.dotdtotal or 0 }}) {% endif %} {{ player.goalstotal or 0 }} {{ player.assiststotal or 0 }} {% set motm_col = 'motm_' + date %} {% set dotd_col = 'dotd_' + date %} {% if player[motm_col] and player[motm_col] > 0 %} {{ player[motm_col] }} {% else %} 0 {% endif %} {% if player[dotd_col] and player[dotd_col] > 0 %} {{ player[dotd_col] }} {% else %} 0 {% endif %}
{% else %}
No MOTM/DotD data found

There is no data in the _hkfc_c_motm table. This might be because no votes have been cast yet.

{% endif %}

Column Management

Drop unwanted columns from the _hkfc_c_motm table.

Drop Specific Column
Drop Fixture Columns

Available Fixtures

{% if fixture_dates %}

The following fixture dates have MOTM/DotD columns in the database:

    {% for date in fixture_dates %}
  • {{ date }} - Columns: motm_{{ date }}, dotd_{{ date }}
  • {% endfor %}
{% else %}
No fixture columns found

No fixture-specific MOTM/DotD columns were found in the database.

{% endif %}