02-10-2024, 09:12 PM
#!/bin/sh
#### Paramètre de connections MYSQL
sql_host="127.0.0.1"
slq_usuario="root"
sql_password=""
sql_database="newproject_db"
### Config ( Max gold - NewGold )
MaxGold="1500000000000"
NewGold="100000000000"
### Parametres de connections
sql_args="-h $sql_host -u $slq_usuario -p$sql_password -D $sql_database -s -e"
### STASH & CHARACTER QUERY
mysql $sql_args "UPDATE t_stash_money SET a_stash_money = $NewGold WHERE a_stash_money > $MaxGold;"
mysql $sql_args "UPDATE t_characters SET a_nas = $NewGold WHERE a_nas > $MaxGold;"
this code should do the job removed the unnecessary checks and modified the query change the sql host parameters it should work.
#### Paramètre de connections MYSQL
sql_host="127.0.0.1"
slq_usuario="root"
sql_password=""
sql_database="newproject_db"
### Config ( Max gold - NewGold )
MaxGold="1500000000000"
NewGold="100000000000"
### Parametres de connections
sql_args="-h $sql_host -u $slq_usuario -p$sql_password -D $sql_database -s -e"
### STASH & CHARACTER QUERY
mysql $sql_args "UPDATE t_stash_money SET a_stash_money = $NewGold WHERE a_stash_money > $MaxGold;"
mysql $sql_args "UPDATE t_characters SET a_nas = $NewGold WHERE a_nas > $MaxGold;"
this code should do the job removed the unnecessary checks and modified the query change the sql host parameters it should work.

