Change the parameter delimiter (& is the default)

sqlmap

python sqlmap.py -u "{{http://www.target.com/vuln.php}}" --data="{{query=foobar;id=1}}" --param-del="{{;}}"

click the source code to copy install sqlmap on any operating system with command-not-found.com