def Get_mte_status(cur, status):
    """
    Perform and execute mysql command (select by M&TE status), obtain the all response from DB
    # result = cur.fetchall()  # This method fetches all rows from the last executed statement
    # result = cur.fetchone() # This method return the first row of the result
    :param status: INT (0-OutOfCalibration; 1-Calibrated+Less2months; 2-InStorage)
    :return: all results of query to DB
    """
    cur.execute("""SELECT m.AssetNum, m.Model, m.SerialNum, m.DueCalibration, k.Certificate  
                    FROM mte_list AS m RIGHT JOIN mte_calibration as k  
                    ON k.AssetNum=m.AssetNum
                    WHERE k.DueCalibration=m.DueCalibration AND m.Status =""" + status)
    result = cur.fetchall()
    return result