Books

=’2010-01-01′ AND meta_key=’bookid’ AND meta_value=perma AND post_id=ID ORDER BY Date_Read DESC”;
$row = $wpdb->get_results($sql, ARRAY_A);

$yearbooks = sizeof ($row);

$numbooks = $yearbooks + 61 + 82 + 131 + 82 + 66 + 46 + 65 + 77 + 54 + 38;
$yeardays = date (“z”) + 1;

$avdays = number_format ($yeardays/$yearbooks, 2);

$allyeardays = $yeardays + 366 + 365 + 365 + 365 + 366 + 365 + 365 + 365 + 366 + 365;
$allavdays = number_format ($allyeardays/$numbooks, 2);

echo “

I started keeping track of the majority of the books I read at the beginning of 2000. Since then I’ve read $numbooks books (one every $allavdays days on average). I have a big list of all these books in alphabetical order of author.

“;

echo “

    “;
    echo “

  • In 2000 I read 61 books, an average of one every 6 days.
  • “;
    echo “

  • In 2001 I read 82 books, an average of one every 4.5 days.
  • “;
    echo “

  • In 2002 I read 131 books, an average of one every 2.8 days.
  • “;
    echo “

  • In 2003 I read 82 books, an average of one every 4.5 days.
  • “;
    echo “

  • In 2004 I read 65 books, an average of one every 5.5 days.
  • “;
    echo “

  • In 2005 I read 46 books, an average of one every 7.9 days.
  • “;
    echo “

  • In 2006 I read 65 books, an average of one every 5.5 days.
  • “;
    echo “

  • In 2007 I read 77 books, an average of one every 4.7 days.
  • “;
    echo “

  • In 2008 I read 54 books, an average of one every 6.8 days.
  • “;
    echo “

  • In 2009 I read 38 books, an average of one every 9.6 days.
  • “;
    echo “

  • So far in 2010 I have read $yearbooks books, an average of one every $avdays days.
  • “;

    echo “

“;

echo “

this years reads:

“;

echo “

    “;
    $c = $yearbooks;
    foreach ($row as $book)
    {
    $dread =strtolower (date (“j/m/Y”,strtotime(rawurldecode($book[Date_Read]))));

    $st = strtotime ($book[post_date]);
    $sy = date (“Y”, $st);
    $sm = date (“m”, $st);
    $sd = date (“d”, $st);

    $slug = “/$sy/$sm/$sd/$book[post_name]/”;

    // $link = “http://www.amazon.co.uk/exec/obidos/ASIN/”.$book[uk_asin].”/nocto-21″;
    // $slink = //”http://www.amazon.co.uk/exec/obidos/external-search?tag=nocto-21&keyword=”.$book[First].”%20″.$book[Last].”&mode=books”;
    echo “

  • “;
    echo “$c. $book[Title] by $book[First] $book[Last] ($dread)”;
    echo “
  • “;
    $c–;
    }

    ?>

Start the discussion

Leave a Reply

Your email address will not be published. Required fields are marked *