admin function complete, next optimize mysql query