mysql notes function complete