in reply to Re: Re: DBI::mysql fetch() without execute() PROBLEM
in thread DBI::mysql fetch() without execute() PROBLEM
I should have seen that right away. You are trying to connect to a mysql database with syntax for the DBI::CSV module. When using the mysql driver connect like this:
my $dsn = "DBI:mysql:database=your_db_name;host=your_hostname;"; my $dbh = DBI->connect($dsn,'your_db_username','your_db_password') or +die "Couldn't connect to database";
So instead of "f_dir" use "database=" and make sure to put the host name. If you are trying to use a comma separated file somewhere on your system then you should use the CSV driver, just keep using the f_dir part and put "CSV" where you have "mysql".
Hope that helps
Chris
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: DBI::mysql fetch() without execute() PROBLEM
by peppiv (Curate) on Jan 22, 2002 at 20:47 UTC | |
by cfreak (Chaplain) on Jan 23, 2002 at 00:32 UTC | |
by peppiv (Curate) on Jan 23, 2002 at 21:37 UTC | |
by cfreak (Chaplain) on Jan 24, 2002 at 00:40 UTC |