Changeset 213 for trunk/lib/Vote/DB/Poll.pm
- Timestamp:
- 04/16/09 20:47:17 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Vote/DB/Poll.pm
r209 r213 363 363 : $self->_register_ballot_clear($choice, $fchoice)) 364 364 or do { 365 self->rollback;365 $self->rollback; 366 366 return; 367 367 }; … … 380 380 $uid ||= Vote::DB::common::gen_uid(); 381 381 $addb->execute($uid, $self->voteid, scalar(@{$fchoice || []}) ? undef : 'f') or do { 382 self->rollback;382 $self->rollback; 383 383 return; 384 384 }; 385 385 386 386 $self->_register_ballot_items($uid, $choice, $fchoice) or do { 387 self->rollback;387 $self->rollback; 388 388 return; 389 389 }; … … 395 395 my ($self, $value) = @_; 396 396 397 my $sth = $self-> prepare_cached(397 my $sth = $self->db->prepare_cached( 398 398 q{select key from choice where lower(label) = ? and poll = ?} 399 399 ); 400 $sth->execute(lc($value), $self-> pollid);400 $sth->execute(lc($value), $self->voteid); 401 401 my $res = $sth->fetchrow_hashref; 402 402 $sth->finish; … … 510 510 $self->commit; 511 511 512 513 512 $uid 514 513 } … … 772 771 my $sth = $self->db->prepare_cached( 773 772 q{ 774 insert in ballot_map (poll, "from", to) values (?,?,?)773 insert into ballot_map (poll, "from", "to") values (?,?,?) 775 774 } 776 775 ); … … 786 785 $mail =~ s/^\s*//; 787 786 $mail = lc($mail); 787 $id ||= ''; 788 788 $id =~ s/\s*$//; 789 789 $id =~ s/^\s//; … … 794 794 ); 795 795 796 if ($upd->execute($id || '', $mail, $self->voteid) == 0) {796 if ($upd->execute($id, $mail, $self->voteid) == 0) { 797 797 my $add = $self->db->prepare_cached(q{ 798 798 insert into voting (poll, label, mail) values (?,?,?)
Note: See TracChangeset
for help on using the changeset viewer.