import sqlite3


def get_member_data(member_id: str, conn: sqlite3.Connection) -> dict:
    """
    Gets email and phone data from database based on passed member.
    This function uses placeholders in query so it is injection safe.
    Look up get_member_data_injection for example where it's NOT injection safe.
    """
    query = "SELECT EMAIL,PHONE FROM MEMBERS WHERE MEMBER_ID=?"
    cursor = conn.cursor()
    cursor.execute(query, (member_id,))
    rows = cursor.fetchall()
    return dict(rows)