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.

trends name
#3
(02.09.2025, 14:14)Daniel Wrote: Try this
Code:
query = 'SELECT name FROM trends'
for _, object in ipairs(db:getall(query)) do
      name=tostring(object.name or '')
      log(name)
end
I try this but i don't have all the trends 
Code:
local rows = db:getall("SELECT id, name FROM trends ORDER BY name COLLATE NOCASE")
for _, r in ipairs(rows or {}) do
  log(string.format('%s (id=%s)', tostring(r.name or ''), tostring(r.id or '')))
end

if not rows or #rows == 0 then
  log('[db-trends] Aucun enregistrement trouvé dans la table trends (ou table vide).')
end
 
Reply


Messages In This Thread
trends name - by hocine - 02.09.2025, 13:05
RE: trends name - by Daniel - 02.09.2025, 14:14
RE: trends name - by hocine - 02.09.2025, 19:39
RE: trends name - by Daniel - 03.09.2025, 06:56
RE: trends name - by hocine - 03.09.2025, 10:46
RE: trends name - by Daniel - 03.09.2025, 12:43
RE: trends name - by hocine - 04.09.2025, 06:28

Forum Jump: