Changeset 432 for trunk/cgi-bin/IPDB.pm
- Timestamp:
- 07/16/10 17:31:13 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r429 r432 130 130 # Set up for a PostgreSQL db; could be any transactional DBMS with the 131 131 # right changes. 132 # This definition should be sub connectDB($$$) to be technically correct,133 # but this breaks. GRR.134 132 sub connectDB { 135 my ($dbname,$user,$pass) = @_; 133 my $dbname = shift; 134 my $user = shift; 135 my $pass = shift; 136 my $dbhost = shift; 137 136 138 my $dbh; 137 my $DSN = "DBI:Pg:host=ipdb-db;dbname=$dbname"; 138 # my $user = 'ipdb'; 139 # my $pw = 'ipdbpwd'; 139 my $DSN = "DBI:Pg:".($dbhost ? "host=$dbhost;" : '')."dbname=$dbname"; 140 140 141 141 # Note that we want to autocommit by default, and we will turn it off locally as necessary.
Note:
See TracChangeset
for help on using the changeset viewer.