If I have in the database the record "Diana" I want to erase it because it's not an element of the array @test. In the way i do it it deletes all the records from the database. Thank you very much for your time.my @test=("Anna","Maria","Carmen") foreach $line(@test){ my $sth=$dbh->prepare(qq{DELETE FROM tnt WHERE `Name`!=\"$lin +e\"}); $sth->execute(); $sth->finish; }
In reply to deleting from a mysql database by bory
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |