Jim,
Why not try something like this:
(The code is "SLIGHTLY" different than yours, but does the same thing...
Basically, the query result is the complete set of what you were looking
for. if you need the inverse of this, change the SQL to read NOT IN
instead of just IN
Hope this helps!
Brent
use strict;
use DBI;
my $dbh = DBI->connect("DBI:mysql:MyDataBase","username","password")
or die("Cannot connect: $DBI::errstr\n");
open(LOG,"logfile.txt") or die ("Error! $!\n");
my @isbns = <LOG>;
close LOG;
chomp(@isbns);
my $poo = '"' . join('","', @isbns); # quote the strings
$poo =~ s/\,\"$//; # get rid of the last quote
print "List we are looking for: $poo\n\n";
my $sql = qq(SELECT isbn, title FROM library WHERE isbn IN ($poo));
my $sth = $dbh->prepare($sql);
$sth->execute();
while(my $p = $sth->fetch){
for(@$p){
print "Found a match: $_\n";
}
print "\n";
}
"FLAHERTY,
JIM-CONT" To: "Beginners (E-mail)"
<[EMAIL PROTECTED]>
<Jim.Flaherty@cnet cc:
.navy.mil> Subject: Help with negitive query
results in Perl and MySql
01/24/02 01:14 PM
I have Red hat 7.1 . I have a script that scans the common drive and
gathers file owner name , size, and last access date . and dumps into a DB.
the second half if the script gets owners name and looks up in another
table
... that I have been manually installing user name to email . I want the
script if It cant find a email for the user , it will email to remind me to
research the name and enter a email.
The problem is quering the table and what is the result when It doesnt find
an email for this users
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]