safer variable handling

This commit is contained in:
Vincent Riquer 2013-02-25 17:29:57 +01:00
parent 51dea2ea17
commit e1d592a964

6
atom
View File

@ -252,7 +252,7 @@ Select() {
then then
where_statement+=( "$key is NULL" ) where_statement+=( "$key is NULL" )
else else
where_statement+=( "$key='$value'" ) where_statement+=( "$key="'"'"${value//\"/\\\"}"'"' )
fi fi
done done
echo "SELECT IFNULL(" \ echo "SELECT IFNULL(" \
@ -327,7 +327,7 @@ Update(){
what=value what=value
;; ;;
value) value)
set_statement="${set_statement}='$argument'" set_statement="${set_statement}="'"'"${value//\"/\\\"}"'"'
what=key what=key
;; ;;
esac esac
@ -339,7 +339,7 @@ Update(){
then then
where_statement+=( "$key is NULL" ) where_statement+=( "$key is NULL" )
else else
where_statement+=( "$key='$value'" ) where_statement+=( "$key="'"'"${value//\"/\\\"}"'"' )
fi fi
done done
echo "UPDATE '$table' SET" \ echo "UPDATE '$table' SET" \