[Bioperl-l] Trying to get a mysql DB from genbank flatfiles

Jason Eric Stajich jason@cgt.mc.duke.edu
Tue, 27 Nov 2001 16:44:05 -0500 (EST)


> rafe
>
> Nirav Merchant wrote:
> >
> > If you use the following method you don't need to use quote() ..It handles
> > just about any pesky special characters you can think of
> >
> > $sth= $dbh->prepare("INSERT INTO myseqbank
> > (seqname,gid,type,dir,author,sequence,length,notes,date)
> > values(?,?,?,?,?,?,?,?,?)");

This is also faster if you want to execute an insert statement many times
so you create the Statement handle (sth) and execute it multiple times.

In rdbms that support stored procedures (sybase esp) DBD::sybase will
actually make a stored proc out of the statement and thus will execute
much much faster.

> >   $sth->execute($seqname,$gid,$type,$dir,$author,$sequence,$length,$notes,$date)
> > or die "Cannot insert\n";
> >
> > Works like a champ for me
> >
> > regards,
> > Nirav
> >
> > At 12:08 PM 11/27/2001 -0500, Raphael LaFrance wrote:
> > >Just as a heads-up... you're going to have to do it to most other string
> > >fields too.  I found this to be an endemic problem in most of the long
> > >string fields in the genbank files (feature description & keywords,
> > >references, comments, etc. etc.)
> > >
> > >rafe
> > >
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

-- 
Jason Stajich
Duke University
jason@cgt.mc.duke.edu