syntax issue with quotes in mysql command for a bash script

i'm trying to write a bash script that executes a mysql statement

mysql -sN -e INSERT INTO "$database"."$tableprefix"users (var1, var2,var3) VALUES (123, '1','')

i don't know where to put the quotes
it doesnt work with this one: `

it seems i can only put double quotes around the variables like $prefix

but if i put a single or double quote, or parrenthesis around the insert statement, it doesnt work..

how do i run this insert statement from a bash script?

thanks!

---------- Post updated at 03:32 AM ---------- Previous update was at 03:03 AM ----------

i figured it out
i put the query in between
EOF
and it worked

thanks