Hello,
Hopefully this is the right place to post my question.
I'm trying to create a dynamic query by populating a select statement from an array. The code below is one fetchrow_array problem away from working. Unfortunately, I'm googled out and can't seem to figure out why the fetchrow_array function within the while statement doesn't run.
####
foreach $match(@match) {
($tlast, $tfirst) = split (/:/, $match);
#Select last, first, and RESP of db users
$sql = qq{SELECT LAST, FIRST, RESP FROM data };
$sql .= qq{WHERE LAST="$tlast" AND FIRST="$tfirst" };
#Prep and execute SQL
$st_handle = $db_handle->prepare($sql ) || die "Cannot prepare SQL";
$st_handle->execute || die "Cannot select record" . $st_handle->errstr();
($lastDB, $firstDB, $respDB) = $st_handle->fetchrow_arr ay || warn($st_handle );
}
#####
I get the following warning:
DBI::st=HASH(0x 824e578) when the fetchrow_array executes.
Anyone have additional resources I could look into?
Thanks in advance for any help.
Hopefully this is the right place to post my question.
I'm trying to create a dynamic query by populating a select statement from an array. The code below is one fetchrow_array problem away from working. Unfortunately, I'm googled out and can't seem to figure out why the fetchrow_array function within the while statement doesn't run.
####
foreach $match(@match) {
($tlast, $tfirst) = split (/:/, $match);
#Select last, first, and RESP of db users
$sql = qq{SELECT LAST, FIRST, RESP FROM data };
$sql .= qq{WHERE LAST="$tlast" AND FIRST="$tfirst" };
#Prep and execute SQL
$st_handle = $db_handle->prepare($sql ) || die "Cannot prepare SQL";
$st_handle->execute || die "Cannot select record" . $st_handle->errstr();
($lastDB, $firstDB, $respDB) = $st_handle->fetchrow_arr ay || warn($st_handle );
}
#####
I get the following warning:
DBI::st=HASH(0x 824e578) when the fetchrow_array executes.
Anyone have additional resources I could look into?
Thanks in advance for any help.
Comment