Help for this page

Select Code to Download


  1. or download this
    # Connect to the database.
    my $dbh = DBI->connect("DBI:mysql:database=test;host=localhost",
              "joe","joe's password", {'RaiseError'=>1}) || die "unable to
    + connect to the database";
    # Now the interesting part.
    $dbh->do("INSERT INTO foo VALUES(1,?)",undef, "Tim");
    
  2. or download this
    # From the docs
    $rows = $dbh->do($statement, \%attr, @bind_values)