def get_table(conn, table):
    """ get table data from database
    :param conn The sql database connection
    :param table  The name of the table
    :return table data as fetchall()
    """
    with conn:
        cur = conn.cursor()
        cur.execute("SELECT * FROM " + table)
        conn.commit()
        return cur.fetchall()