function books_by ($author
{
// construct the query
$query = array'limit'=>100,
'name'=>null,
'type'=>'/book/written_work',
'author'=>array'name'=>$author));
// issue the query
$results = freebase_query$query);
$books = array();
foreach ($results as $result) {
if (isset$result'name'])) {
$books[] = $result'name'];
}
}
return $books
}