in reply to how to use nested statement handler?

In the second select statement use '?':
my $pr1 = qq{select customer_name from customer where id = ? };
and move the parameter to execute
$sth1->execute($emp_id);