in reply to error in perl with mysql

1. Don't know where the dependency comes from, but from the log you are missing the module Exporter::Heavy.
2. Declare your variables
3. use $dbh->quote($pdb) instead of '$pdb' in the sql statement
4. check for errors when preparing and executing the query

-----
olus

Replies are listed 'Best First'.
Re^2: error in perl with mysql
by davorg (Chancellor) on Nov 27, 2006 at 16:10 UTC
    use $dbh->quote($pdb) instead of '$pdb' in the sql statement

    Or, even better, use placeholders and an extra parameter to execute.

    $query = 'select * from pdbsummary where pdbid=?'; $exe = $dbh->prepare($query); $exe->execute($pdb);
    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg