in reply to simple search + database problem
$sth = $dbh->prepare (qq{ SELECT * FROM plate WHERE genomic_dna_ +id LIKE ? }); $sth->execute ("%" . $plate . "%"); # # you need to fetch the first results from this # execute before you do the next execute or they # will get lost! # $sth = $dbh->prepare (qq{ SELECT * FROM plate WHERE plate_id LIKE + ? }); $sth->execute ("%" . $plate . "%"); # # or you could possibly do this and fetch both sets # at the same time. # $sth = $dbh->prepare (qq{ SELECT * FROM plate WHERE plate_id LIKE ? OR genomic_dna_ +id LIKE ? }); $sth->execute ("%" . $plate . "%","%" . $plate . "%");
|
|---|