The issue is quote nesting conflict. When you write:
$mysql_conn "prepare stmnt from '${sql}'..."
And ${sql} contains 'entry ', the single quotes inside clash with the outer statement's quotes.
Best solutions:
Use double quotes in the PREPARE statement (Solution 1):
$mysql_conn "prepare stmnt from \"${sql}\"; ..."
Use a heredoc (Solution 2) - cleanest approach:
$mysql_conn <<EOF
prepare stmnt from "select concat('entry ', id) from mytbl where id = ?";
set @id='${entry}';
execute stmnt using @id;
deallocate prepare stmnt;
EOF
Escape the inner single quotes (Solution 3):
sql="select concat(\'entry \', id) from mytbl where id = ?"