#!/usr/bin/perl
use strict;
use warnings;
use DBI;
my $username = "username";
my $password = "password";
my $tut_id = "10";
my $tut_title = "title";
my $tut_author = "author";
my $dsn = "dbi:mysql:thanos:127.0.0.1:3306";
my $dbh = DBI->connect($dsn,$username,$password) or die "cannot
connect to database : $DBI::errstr";
my $sth = $dbh->prepare(qq{INSERT INTO `test` VALUES(?,?,?)});
$sth->execute("$tut_id","$tut_title","$tut_author") || die $DBI::errstr;
$dbh->disconnect;
####
DBD::mysql::st execute failed: Column count doesn't match value count at row 1 at db.pl line 18.
####
INSERT INTO `test` VALUES ('10','title','author')
####
#1136 - Column count doesn't match value count at row 1
####
ERROR 1136 (21S01): Column count doesn't match value count at row 1
####
ERROR 1136 (21S01): Column count doesn't match value count at row 1
####
$sth->execute($tut_id,$tut_title,$tut_author) || die $DBI::errstr;
####
$sth->execute("$tut_id","$tut_title","$tut_author") || die $DBI::errstr;