def get_reply_order_cache_data(comid):
    """
    Prepare a representation of the comment ID given as parameter so
    that it is suitable for byte ordering in MySQL.
    """
    return '%s%s%s%s' % (chr((comid >> 24) % 256), chr((comid >> 16) % 256),
        chr((comid >> 8) % 256), chr(comid % 256))
