bobekdj has asked for the wisdom of the Perl Monks concerning the following question:
CREATE DATABASE cag_repeat; DROP TABLE cag_repeat.CAG_MAIN; CREATE TABLE cag_repeat.CAG_MAIN ( ID INT(10) NOT NULL auto_increment, SEQUENCE_NAME VARCHAR(100) NOT NULL, SEQUENCE TEXT NOT NULL, NOREPEATS VARCHAR(100) NOT NULL, LOCATION VARCHAR(100) NOT NULL, WARNINGLVL VARCHAR(20) NOT NULL, PRIMARY KEY (ID) );
############################# Insert Into Database ################### +########## my $dbh = DBI->connect($dsn, $user, $password) or die "Unable to conne +ct: $DBI::errstr\n"; my $row = $dbh->do("INSERT INTO cag_repeat.CAG_MAIN (SEQUENCE_NAME,SEQUENCE,NOREPEATS,LOCATION,WARNINGLVL) VALUES('$seqname','$sequence','$len','$amino_acid_number','$riskeval') +;"); $dbh->disconnect(); ###################################################################### +##########
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Create database from perl script help
by Tanktalus (Canon) on Dec 15, 2008 at 21:46 UTC | |
|
Re: Create database from perl script help
by hangon (Deacon) on Dec 15, 2008 at 23:34 UTC | |
|
Re: Create database from perl script help
by kdj (Friar) on Dec 15, 2008 at 21:56 UTC | |
|
Re: Create database from perl script help
by mje (Curate) on Dec 15, 2008 at 21:59 UTC | |
by Anonymous Monk on Dec 15, 2008 at 22:34 UTC |