## Read the current vote number from the mySQL database. my $dbh = DBI->connect("DBI:mysql:$database","$username","$password") || error_fatal ("[ vote.cgi: Admin: Unable to open mySQL database - $! ]"); my $sth_1 = $dbh->prepare("SELECT current_vote FROM vote_count;"); $sth_1->execute(); my @vote_no = $sth_1->fetchrow_array(); my $current_vote = $vote_no[0];