mysql in bash with variable
How can i parse a variable in a mysql update statement in a bash script?
i have this but its not going to work
mysql -h HOST -u USERNAME -pUGUESIT -D DATABASE -bse "DELETE FROM table WHERE Pos开发者_JS百科ition='" . $4 ."'; DELETE FROM table WHERE Instance='" . $4 . "';"
ofcourse username and pass etc are correct but not for public. The question is how I can use the $4 in the statement...
Thanks in advance!
You should be able to do it like this:
"DELETE FROM table WHERE Position='$4'; DELETE FROM table WHERE Instance='$4';"
精彩评论