JR's DailyTrends to MySQL database code