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 .= ""; $details .= ""; $details .= ""; $details .= ""; $details .= ""; $details .= ""; $r = 0; while( $row = $result->fetchAssoc() ) { $details .= ""; $details .= ""; $details .= ""; $details .= ""; $details .= ""; } $details .= "
TitleAuthorPhotos
" . $row['title'] . "" . $row['author'] . "" . $row['photocount'] . "
"; }else { $details .= "

No photos found

"; } return $details; } } ?>