diff options
author | emkael <emkael@tlen.pl> | 2018-08-24 12:58:52 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-08-24 12:58:52 +0200 |
commit | cc3acaec7272b57cfd89472690795601ddf7acec (patch) | |
tree | a194b9efe17db6a878caceea1355c2bf4298614d /bin | |
parent | 6f9756cf49e2e2802916ef251732a9377ddd756b (diff) |
Addingg import script for hidden PIDs
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/hidden-import.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/hidden-import.sh b/bin/hidden-import.sh new file mode 100755 index 0000000..ecd9f27 --- /dev/null +++ b/bin/hidden-import.sh @@ -0,0 +1,9 @@ +#!/bin/bash +DBCONFIG=($(jq -r '.[]' config/import-db.json)) +mysql -h ${DBCONFIG[2]} -P ${DBCONFIG[3]} -u ${DBCONFIG[0]} --password=${DBCONFIG[1]} -e "SET foreign_key_checks = 0; +DELETE FROM hidden_players; +LOAD DATA LOCAL INFILE '$1' +INTO TABLE hidden_players +FIELDS TERMINATED BY ';' ENCLOSED BY '\"'; +SET foreign_key_checks = 1 +" ${DBCONFIG[4]} |