oc-news
oc-news copied to clipboard
Statistics not showing
/backend/indikator/news/statistics cannot be found, the error is is
SQLSTATE[HY000]: General error: 1 no such function: YEAR (SQL: select count(id) as c, YEAR(queued_at) as y, MONTH(queued_at) as m from "indikator_news_newsletter_logs" group by YEAR(queued_at), MONTH(queued_at) order by "y" asc, "m" asc)
Is it possible that I get this as I use an SQLITE database as opposed to the standard MYSQL?
It is possible.
SQLite does not have a YEAR
nor MONTH
function.
Instead use strftime('%Y', queued_at)
, unfortunately this is not compatible with other SQL databases.
Might it be possible to rewrite this query with eloquent?