MV Func db_query()
This commit is contained in:
parent
6d36742007
commit
3b09ccdf86
@ -31,3 +31,14 @@ function db_check() {
|
||||
echo $FALSE
|
||||
fi
|
||||
}
|
||||
|
||||
# db_query <query> -> result
|
||||
function db_query() {
|
||||
local args="-sN" #no headers, no grid
|
||||
args+=" -h$dbhost"
|
||||
args+=" -u$dbuser"
|
||||
[ -n "$dbpwd" ] && args+=" -p$dbpwd"
|
||||
args+=" $dbname"
|
||||
[ $DEBUG == $TRUE ] && echo $@ >&2
|
||||
echo $@ | mysql $args
|
||||
}
|
||||
|
@ -138,18 +138,7 @@ function md5_out_del() {
|
||||
exit 0
|
||||
}
|
||||
|
||||
# help functions
|
||||
|
||||
# db_query <query> -> result
|
||||
function db_query() {
|
||||
local args="-sN" #no headers, no grid
|
||||
args+=" -h$dbhost"
|
||||
args+=" -u$dbuser"
|
||||
[ -n "$dbpwd" ] && args+=" -p$dbpwd"
|
||||
args+=" $dbname"
|
||||
echo $@ | mysql $args
|
||||
}
|
||||
|
||||
#all loaded stat now
|
||||
case "$mode" in
|
||||
"a") #in_add
|
||||
md5_in_add
|
||||
|
@ -197,16 +197,5 @@ function file_add() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
# db_query <query> -> result
|
||||
function db_query() {
|
||||
local args="-sN" #no headers, no grid
|
||||
args+=" -h$dbhost"
|
||||
args+=" -u$dbuser"
|
||||
[ -n "$dbpwd" ] && args+=" -p$dbpwd"
|
||||
args+=" $dbname"
|
||||
[ $DEBUG == $TRUE ] && echo $@ >&2
|
||||
echo $@ | mysql $args
|
||||
}
|
||||
|
||||
main #aufruf der main function (eig. programmstart)
|
||||
#all loaded stat now
|
||||
main
|
||||
|
Loading…
Reference in New Issue
Block a user