Hello!
To see the file structure, click on "tree".
Note that updates take place every 10 minutes, commits may not be seen immediately.
projects
/
old-jaiswallab-svn
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33f70c8
)
Added dbconnect_auto subroutine to allow for db connection with supplied credentials...
author
elserj
<elserj@localhost>
Wed, 25 Jan 2012 00:20:51 +0000
(
00:20
+0000)
committer
elserj
<elserj@localhost>
Wed, 25 Jan 2012 00:20:51 +0000
(
00:20
+0000)
svn path=/; revision=276
interactome_scripts/DbiFloret.pm
patch
|
blob
|
history
diff --git
a/interactome_scripts/DbiFloret.pm
b/interactome_scripts/DbiFloret.pm
index b99a56bdb1da92d55b5705ad45e323784febd5a9..a4dc781e1e8469295f7e9a807b463a46a1a91576 100755
(executable)
--- a/
interactome_scripts/DbiFloret.pm
+++ b/
interactome_scripts/DbiFloret.pm
@@
-24,6
+24,21
@@
sub dbconnect {
return $dbh;
}
+
+sub dbconnect_auto {
+ my $self =@_;
+
+ my $username = $_[0];
+ my $password = $_[1];
+ my $database = $_[2];
+
+ my $dbh = DBI->connect("DBI:mysql:$database;host=floret.cgrb.oregonstate.edu", $username, $password,
+ { RaiseError=> 1, AutoCommit=>1 }
+ ) or die "Failed to connect to database: $DBI::errstr";
+
+
+ return $dbh;
+}
return 1;