punch_card_don has asked for the wisdom of the Perl Monks concerning the following question:
Now I'd like to query the database using the DBI in a cgi program to ensure that my table was created correctly, but can't seem to find how. Would some be so kind?$dbh = DBI->connect($db_datasource, $db_user_name, $db_password) or di +e("Could not connect!"); $tbl_create = " CREATE TABLE responses ( response smallint unsigned, respondent smallint unsigned, index response_index (response) ) "; my $command = $dbh->prepare($tbl_create) or die("Could not prepare!"); $command->execute() or die("Could not create!");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to query mysql database schema with DBI
by dragonchild (Archbishop) on Oct 04, 2004 at 20:04 UTC | |
by punch_card_don (Curate) on Oct 04, 2004 at 20:50 UTC | |
by punch_card_don (Curate) on Oct 04, 2004 at 20:52 UTC | |
by shemp (Deacon) on Oct 04, 2004 at 22:50 UTC | |
by dragonchild (Archbishop) on Oct 04, 2004 at 21:08 UTC | |
by punch_card_don (Curate) on Oct 04, 2004 at 21:20 UTC |