Alphabetical by Author

=’2000-01-01′ AND meta_key=’bookid’ AND meta_value=perma AND post_id=ID ORDER BY Last, First,date_read ASC”;
$row = $wpdb->get_results($sql, ARRAY_A);

$yearbooks = sizeof ($row);

$numbooks = $yearbooks;

echo ”

This is a rather long list of all the books I’ve read since the beginning of 2000 in order of author, and then titles in the order I read them.

The only problem I’ve noticed is that the Andrew Taylor who wrote ‘A Plum in Your Mouth’ is a different Andrew Taylor than the one who writes mystery novels.

“;

echo “

a rather long list

“;

echo “

    “;
    $lastsurname=””;
    $lastfirstname=””;
    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”;
    if ($lastsurname!=$book[Last].” “.$book[First])
    {
    echo “

  • $book[First] $book[Last]:
    • “;
      }
      echo “

    • $book[Title] ($dread)
    • “;
      $lastsurname=$book[Last].” “.$book[First];
      }

      ?>

    Start the discussion

    Leave a Reply

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