in reply to get undefined error when trying to invoke SQL query in perl script
Need more code. The problem isn't with the variable you're trying to bind but the variable invoking the bind_param call. The normal sequence of events is something like this:
So from your error message above, I would assume your statement handle is bad.my $dbh = ....; my $sth = $dbh->prepare( "SELECT fld from tab where fld = ?" ); $sth->bind_param(1, "val"); $sth->execute;
|
|---|