Monks,
Imagine I have just created a mysql table using the DBI in a cgi program:
$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!");
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?
Thanks,
Don.

In reply to How to query mysql database schema with DBI by punch_card_don

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.