This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Export entire trend log database once
#2
You can get a list of all trends via a db request, then you can call fetch:
Code:
require('trends')
names = db:getlist('SELECT name FROM trends')

dates = {}
dates['start'] = os.date('*t')
dates['start'].year = dates['start'].year - 1
dates['end'] = os.date('*t')

for _, name in ipairs(names) do
  data = trends.fetch(name, dates)
end
Reply


Messages In This Thread
RE: Export entire trend log database once - by admin - 19.06.2017, 07:40

Forum Jump: