Ejemplo n.º 1
0
function find_authors()
{
    return find_objects_by_sql("SELECT * FROM `authors`");
}
Ejemplo n.º 2
0
function find_books()
{
    $sql = "SELECT " . "b.id as id, b.title as title, b.year as year, b.author_id as author_id, " . "a.name as author_name, a.birthday as author_birthdady, a.bio as author_bio " . "FROM books b " . "LEFT JOIN authors a ON a.id=b.author_id";
    return find_objects_by_sql($sql);
}