Reputation: 280
I'm running the below script
mysql -u $_db_user -p$_db_password $_db << eof
INSERT INTO \`manufacturemap\`
(\`manufacture_id`\ `manufacture_name`\) VALUES (122,IBM)
eof
done
exit
but it shows the following Error
bad substitution: no closing "`" in `manufacture_name'\) VALUES (122,IBM))
I've tried everything I know,Please help, kinda stuck here.
Upvotes: 0
Views: 44
Reputation: 31739
Missing ,
and wrong \
s in ->
(\`manufacture_id`\ `manufacture_name`\)
Should be -
(\`manufacture_id\`, \`manufacture_name\`)
No escaping needed -
INSERT INTO manufacturemap (manufacture_id, manufacture_name) VALUES (122, 'IBM')
Upvotes: 1