Wrong SQL syntax in FAQ entry 42 #2219
Labels
Bug
For errors / faults / flaws / inconsistencies etc.
worksforme
The issue cannot be reproduced and things work as intended.
Milestone
There is a FAQ entry describing "How do I purge Piwik logs?" where the SQL statement contains "AND visit_first_action_time <= CURRENT_DATE() - 30".
That statement gives this error (MySQL server 5.0.51a):
"Incorrect datetime value: '20110293' for column 'visit_first_action_time' at row 1"
The statement should be corrected to:
"AND visit_first_action_time <= DATE_SUB(CURDATE(), INTERVAL 30 DAY)"
Additionally, it should perhaps also be stated that the tables have to be optimized afterwards to regain the diskspace that was freed in the DB.
PS: I tried to include the URL to the FAQ entry in question but my ticket is then rejected as spam. If possible please allow URLs for the piwik domain.
The text was updated successfully, but these errors were encountered: