When things start to get tricky with quotes I often find it easier to create a couple of simple functions to do the work for me:
Code:
$sCommand='mysql -u root test -e '+DQuote('insert into info(first,last) values ('+SQuote($first)+','+SQuote($last)+')')

SHELL $sCommand

Function SQuote($s) $SQuote="'"+$s+"'" EndFunction
Function DQuote($s) $DQuote='"'+$s+'"' EndFunction