addField("book.id", "book_id"); $queryBuilder->addField("book.photocount", "photocount"); $queryBuilder->addField("book.title", "title"); $queryBuilder->addField("user.name", "author"); $queryBuilder->addInnerJoin("user", "uid", "book.uid"); $queryBuilder->addWhereEquals("book.eventcode", $eventcode); $queryBuilder->addWhereGreater("book.photocount", 0); $queryBuilder->addOrderAsc("book.title"); $queryBuilder->addOrderAsc("user.name"); $result = $db->select($queryBuilder->toQuery()); $details = ""; if( $result->numRows() > 0 ) { $details .= "
Title | "; $details .= "Author | "; $details .= "Photos | "; $details .= "
---|---|---|
" . $row['title'] . " | "; $details .= "" . $row['author'] . " | "; $details .= "" . $row['photocount'] . " | "; $details .= "
No photos found
"; } return $details; } } ?>