I couldnt understand where the error could be.
I get the correct sql statement, when I execute this statement in MySQL, it gives the correct document_id. So there is no mistake in SQL statement.
There are no compilation errors or runtime errors, but I couldnt get correct value in $document_id[0].
Thanks in advance.
The code is
my $dbh_delmetadata_sql = "SELECT document_id FROM delivery_metadata WHERE tracking_id = '$data[1]'";
print "sql is $dbh_delmetadata_sql\n";
my $do_dbh_delmetadata = $dbh_delmetadata->prepare($dbh_delmetadata_sql) or die "Couldn't prepare for delivery_metadata";
$do_dbh_delmetadata->execute() or die "Couldn't execute dest delivery metadata statement";
my @document_id = $do_dbh_delmetadata->fetchrow_array();
print "Document id is $document_id[0]\n";
I get the correct sql statement, when I execute this statement in MySQL, it gives the correct document_id. So there is no mistake in SQL statement.
There are no compilation errors or runtime errors, but I couldnt get correct value in $document_id[0].
Thanks in advance.
The code is
my $dbh_delmetadata_sql = "SELECT document_id FROM delivery_metadata WHERE tracking_id = '$data[1]'";
print "sql is $dbh_delmetadata_sql\n";
my $do_dbh_delmetadata = $dbh_delmetadata->prepare($dbh_delmetadata_sql) or die "Couldn't prepare for delivery_metadata";
$do_dbh_delmetadata->execute() or die "Couldn't execute dest delivery metadata statement";
my @document_id = $do_dbh_delmetadata->fetchrow_array();
print "Document id is $document_id[0]\n";