Ignore:
Timestamp:
04/14/09 20:02:56 (15 years ago)
Author:
nanardon
Message:
  • start new value mapping method
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Vote/DB/Ballot.pm

    r171 r195  
    6565 
    6666    my $sth = $self->db->prepare_cached( 
    67         q{select *, value as v from ballot_item where id = ?} 
     67        q{ 
     68        select ballot_item.*, value as v, 
     69        coalesce(ballot_map.to, corrected) as corrected 
     70        from ballot_item join ballot on ballot.id = ballot_item.id 
     71        left join ballot_map on ballot_map.poll = ballot.poll and 
     72        ballot_map.from = ballot_item.value 
     73        where ballot.id = ? 
     74        } 
    6875    ); 
    6976    $sth->execute($self->ballotid); 
Note: See TracChangeset for help on using the changeset viewer.