Created
April 8, 2016 09:55
-
-
Save drvenabili/f77f0cf71fae03440bf66dae36bb31dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
date1=$(date +%Y-%m-%d) | |
date1="\"$date1 00:00:00\"" | |
echo $date1 | |
date2=$(date -d "1 week ago" +%Y-%m-%d) | |
date2="\"$date2 00:00:00\"" | |
echo $date2 | |
echo "SELECT "server_time", "piwik_log_action.name" AS "url" FROM "piwik_log_link_visit_action" JOIN "piwik_log_action" ON "piwik_log_link_visit_action.idaction_url" = "piwik_log_action.idaction" WHERE "idsite" =16 AND "server_time" > $date2 AND "server_time" < $date1 ORDER BY "server_time";" | mysql -u root -pljungan piwik2; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment