Re: DBI access from CGI script

2001-05-25 Thread Colin Faber
This is well outlined in the DBI perldoc btw ;-) Andy Sharp wrote: > > The syntax for connecting to a mysql database from perl/DBI is > > my $dbh = > DBI->connect('dbi:::','',' d>'); > > If host is ommitted, it presumes localhost. > > Eg: $dbh = > DBI->connect('dbi:mysql:testDB:dbserv','$use

RE: DBI access from CGI script

2001-05-25 Thread Andy Sharp
The syntax for connecting to a mysql database from perl/DBI is my $dbh = DBI->connect('dbi:::','',''); If host is ommitted, it presumes localhost. Eg: $dbh = DBI->connect('dbi:mysql:testDB:dbserv','$username','$password'); There are more options see perldoc DBI and perldoc DBD::mysql --A >>

Re: DBI access from CGI script

2001-05-25 Thread Chris Petersen
> This is what I have derived from O'Reilly books, though they make the > assumption that you are > running the script from the same server as the database: > $dbh = DBI->connect("dbi:mysql:table1", "$host", "$user", "$password") or die > "Unable to connect"; > # table1 is the name of database. I