& /designobservercomp/header.comp, site=>1, adcols=>2 &>
<& /designobservercomp/nav_designobserver.comp &>

<& /designobserver/50Books50Covers/5050-2011-nav.comp &>
2012 Covers Winners
% if ($#books >= 0){
% for ($i = 0; $i <= $#books; $i++){
% $j ++;
% if ($j > 3){
% $j = 1;
% }
% }
% }
<& /designobservercomp/adDOG_2col.comp &>
<& /designobservercomp/footer.comp &>
<%init>
use RubyCore::ObjectInit;
use designobserver::Config();
my $rso = new RubyCore::ObjectInit { %designobserver::Config::c };
$rso->dbconnect();
my ($i, $sql, $sth);
my $j = 1;
my @temp;
my @books;
$sql = "SELECT title, author, publisher, designfirm, artdirector, designer, othercredits, book, cover, coverimage, nominator, id, finalist_cover, book FROM 5050_2012 WHERE published IS NOT NULL AND cover='y' AND finalist_cover='y' ORDER BY title";
$sth = $rso->dosql($sql);
while (@temp = $sth->fetchrow_array ()){
push @books, [@temp]; #add each array reference to the news array
}
%init>