the original code is expired. this version refactor the code then get data from mysql database.