MySQL Basics In Pictures
  1. Make a connection to the database:

    my $dbh = DBI->
    connect(specify connection info, user id and password variables here, separated by commas);

    TIP: Remember that the Perl database interface (DBI) module connects to the MySQL server with the filehandle $dbh, using $connectionInfo, $userid, and $passwd.
  2. Prepare a query that selects all of the quotations and the president who said each:

    my $query = "write your query here";
  3. Execute the query:

    my $sth = $dbh->prepare($query);
  4. Assign fields to the variables:

    my (list variables here, separated by commas);

    $sth->bind_columns(undef, \specify first variable here, \specify second variable here, \specify third variable here, \specify fourth variable here);