Created
July 16, 2012 12:35
-
-
Save lawlesst/3122445 to your computer and use it in GitHub Desktop.
Cleans the search history table in Vufind.
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/sh | |
#removes expired searches in Vufind search history table | |
EXPIRE_DATE=`date --date="-2 day" +%Y-%m-%d` | |
echo "Vufind - deleting expired search sessions from $EXPIRE_DATE." | |
mysql -u $1 --password=$2 -e "delete from search where (saved=0 AND created<=\"${EXPIRE_DATE}\")" vufind |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment