- modular db_query
- empty password wont be asked animore
This commit is contained in:
parent
d95a7ea54f
commit
ba3ac3b276
@ -80,7 +80,12 @@ function md5_out_del() {
|
||||
|
||||
# db_query <query> -> result
|
||||
function db_query() {
|
||||
echo $@ | mysql -h$dbhost -u$dbuser -p$dbpwd $dbname
|
||||
local args="-sN" #no headers, no grid
|
||||
args+=" -h$dbhost"
|
||||
args+=" -u$dbuser"
|
||||
[ -n "$dbpwd" ] && args+=" -p$dbpwd"
|
||||
args+=" $dbname"
|
||||
echo $@ | mysql $args
|
||||
}
|
||||
|
||||
# db_exist_md5 <md5> -> true/false 0/1
|
||||
|
Loading…
Reference in New Issue
Block a user