SPUG: DBI bind_param in MySQL
Michael R. Wolf
MichaelRWolf at att.net
Fri Nov 26 16:16:45 CST 2004
When I try this, I get a literal (e.g. "first_name") in the output,
not the value of the field.
my $sth = $dbh->prepare("SELECT ? FROM bod")
or die "Cannot create sth: $DBI::errstr";
# my @fields = qw/
# first_name
# middle_name
# last_name
# suffix
# title
# company
# image_file
# /;
$sth->bind_param(1, "first_name");
$sth->execute()
or die "Cannot execute statement: $DBI::errstr";
Am I missing something important, or is this feature unavailable with
MySQL?
--
Michael R. Wolf
All mammals learn by playing!
MichaelRWolf at att.net
More information about the spug-list
mailing list