[HELP] A gift to all classes
#3


#!/bin/bash
#


host=127.0.0.1
user=root
pass=
newproject_db=newproject_db
item=123
amount=12


select=`mysql -D $newproject_db -h $host --user=$user --password=$pass --skip-column-names -e "SELECT a_index from t_characters where a_enable = 1 ;"`

for char in ${select[@]}

do

setitem=`mysql -D $newproject_db -h $host --user=$user --password=$pass --skip-column-names -e "INSERT into t_auto_give (a_char_index, a_item_index, a_item_count) VALUES ($char, $item, $amount); "`

done

it's a shell. you must create a .sh file, give right to execute with centos cmd. Don't forget to edit amount, item,pass,user and newproject_db



Messages In This Thread
[No subject] - by Drakonium - 01-05-2015, 06:43 PM
[No subject] - by DamonA - 01-05-2015, 06:55 PM
[No subject] - by WorldOfWars - 01-05-2015, 08:12 PM
[No subject] - by Drakonium - 01-05-2015, 09:27 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)