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

Raphael LaFrance rafe@scinq.org
Tue, 27 Nov 2001 16:10:58 -0500


Nice! This was my 1st perl program (newbie) & I wound up with less
elegant methods. Thanks for the tips. They'll definitely make it into my
new programs.

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(?,?,?,?,?,?,?,?,?)");
>   $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
> >