I have another question on this topic. The code currently does the
following:
$oraProdDBH = DBI->connect(...);
$getMatchRec = $oraProdDBH->prepare (... the information about the
select ...)
$getMatchRec->execute()
if ($oraProdDBH->rows != 0)
This is the point where, in the current thread, I've been given
assurance that it is unreliable to check the rows variable before a
fetch method has been called. Note, h owever, that this is not the
handle of the select statement, but the DBI connection.
What would normally be in the DBI connection handle's rows instance
variable? Results from the last operation? Accumulated information
about rows touched?
Later in the code, I see
while (@coreRecord = $getMatchRec->fetchrow_array())
$string = "... sql delete statement ...";
$oraProdDBH->do
(
$string
);
}
if ($getMatchRec->rows == 0) {
print "No duplicate records found\n";
}
In the logic, and the way that it is used, I expect that is looking at
the results of the select, to see, now that the while loop has
finished, how many rows were fetched. I just was uncertain about that
reference to the oraProdDBH->rows variable.
If anyone knows from a DBI point of view what that variable represents
and would be willing to share that info with me, I'd appreciate it.
Thank you very much.