sdyates has asked for the wisdom of the Perl Monks concerning the following question:
I can write no problem, but cannot for the life of me figure out how to perform a select for read purposes and print the variable out.
Here is my task: Read an email address from database and send email to address
my $sth = $dbh->prepare(<<SQL); Select Email1 from client where reg = ? SQL $sth->execute($id) or err_trap; while ($sth->fetchrow) { print "string $_"; }
The problem is after $sth-> execute line. I cannot figure how to read the value to the select into a scalar. I can do this without using placeholders, but do not want to. I like to security of using placeholders.
THanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Returning the value of a placeholder with select
by lachoy (Parson) on Oct 17, 2002 at 20:09 UTC | |
|
Re: Returning the value of a placeholder with select
by runrig (Abbot) on Oct 17, 2002 at 20:07 UTC |