update chart php syntax to get json data from database