added user and pass variable for db

This commit is contained in:
5UP3RB 2024-07-25 11:33:23 +07:00
parent 6f8501d84a
commit 98dd59b0b7
2 changed files with 21 additions and 16 deletions

View File

@ -4,6 +4,8 @@ change these variables before using
```
SET path=%PATH%;D:\Programs\MariaDB\bin; (MariaDB path)
SET dbUser=root (database username)
SET dbPassword=password (database password)
SET userId=1 (aime user id)
SET amount=999 (amount of statues)
```

View File

@ -1,9 +1,12 @@
SET path=%PATH%;D:\Programs\MariaDB\bin;
SET dbUser=root
SET dbPassword=password
SET userId=1
SET amount=999
mariadb -v -uroot -ppassword -D aime -e "SELECT * from chuni_item_item WHERE itemKind = 5; UPDATE chuni_item_item SET stock = %amount% WHERE itemId = 8000 AND itemKind = 5 AND user = %userId%; UPDATE chuni_item_item SET stock = %amount% WHERE itemId = 8010 AND itemKind = 5 AND user = %userId%; UPDATE chuni_item_item SET stock = %amount% WHERE itemId = 8020 AND itemKind = 5 AND user = %userId%; UPDATE chuni_item_item SET stock = %amount% WHERE itemId = 8030 AND itemKind = 5 AND user = %userId%; SELECT * from chuni_item_item WHERE itemKind = 5;"
mariadb -v -u%dbUser% -p%dbPassword% -D aime -e "SELECT * from chuni_item_item WHERE itemKind = 5; UPDATE chuni_item_item SET stock = %amount% WHERE itemId = 8000 AND itemKind = 5 AND user = %userId%; UPDATE chuni_item_item SET stock = %amount% WHERE itemId = 8010 AND itemKind = 5 AND user = %userId%; UPDATE chuni_item_item SET stock = %amount% WHERE itemId = 8020 AND itemKind = 5 AND user = %userId%; UPDATE chuni_item_item SET stock = %amount% WHERE itemId = 8030 AND itemKind = 5 AND user = %userId%; SELECT * from chuni_item_item WHERE itemKind = 5;"
pause