diff --git a/apps/cover-updater/scripts/import-covers.sh b/apps/cover-updater/scripts/import-covers.sh index dcd0cd10f..78caad027 100755 --- a/apps/cover-updater/scripts/import-covers.sh +++ b/apps/cover-updater/scripts/import-covers.sh @@ -5,4 +5,4 @@ COVER_LIST_EXPORT_FILE=/home/covers.csv echo "Exporting covers from the COA database..." mysql -h ${MYSQL_COA_HOST} -uroot -p${MYSQL_ROOT_PASSWORD} ${MYSQL_COA_DATABASE} ${COVER_LIST_EXPORT_FILE} && echo "Importing covers into the covers database..." && - mysql -uroot -p${MYSQL_ROOT_PASSWORD} -h ${MYSQL_COVER_INFO_HOST} --local-infile=1 ${MYSQL_COVER_INFO_DATABASE} -e "LOAD DATA LOCAL INFILE \"${COVER_LIST_EXPORT_FILE}\" IGNORE INTO TABLE covers FIELDS TERMINATED BY ',' IGNORE 1 LINES (issuecode,sitecode,url);" + mysql -uroot -p${MYSQL_ROOT_PASSWORD} -h ${MYSQL_COVER_INFO_HOST} --local-infile=1 ${MYSQL_COVER_INFO_DATABASE} -e "LOAD DATA LOCAL INFILE \"${COVER_LIST_EXPORT_FILE}\" IGNORE INTO TABLE covers FIELDS TERMINATED BY ',' IGNORE 1 LINES (issuecode,sitecode,url)" diff --git a/apps/cover-updater/scripts/sql/get-coa-covers.sql b/apps/cover-updater/scripts/sql/get-coa-covers.sql index cd245f028..6f9d7cad0 100755 --- a/apps/cover-updater/scripts/sql/get-coa-covers.sql +++ b/apps/cover-updater/scripts/sql/get-coa-covers.sql @@ -11,7 +11,7 @@ ( SELECT MIN(position) FROM inducks_entry e - WHERE entry.issuecode = e.issuecode AND position NOT LIKE 'p%' + WHERE entry.issuecode = e.issuecode GROUP BY e.issuecode ) AND issuecode != ''; \ No newline at end of file