Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wochenansicht Auswertungen & Statistik zeigt die Werte der KW 1-9 nicht an #1610

Closed
error08 opened this issue Feb 19, 2016 · 1 comment
Closed
Labels
Milestone

Comments

@error08
Copy link
Contributor

error08 commented Feb 19, 2016

Wochenansicht Auswertungen & Statistik zeigt die Werte der KW 1-9 nicht an, da die Abfrage der KW in im Having-Statment mit führenden Nullen erfolgt, die Funktion WEEKOFYEAR die KW ohne führenden Nullen zurückliefert.

Aktuell sieht die Stelle zur Ermittlung der Parameter für das SQl-Statment so aus:

 public function getSqlField($fieldName)
    {
        return "CONCAT(FLOOR(YEARWEEK(FROM_UNIXTIME($fieldName), 3) / 100), WEEKOFYEAR(FROM_UNIXTIME($fieldName)))";
    }

Würde dies nicht genügen? Tut zumindest nach den ersten Tests:

public function getSqlField($fieldName)
    {
        return "YEARWEEK(FROM_UNIXTIME($fieldName),3)";
    }
@aschempp aschempp added the bug label Feb 29, 2016
@aschempp aschempp added this to the 2.3.4 milestone Feb 29, 2016
@aschempp
Copy link
Member

You're absolutely right. The complex SQL was related to calculating the correct year, but apparently your method does exactly the same :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants