本文整理汇总了PHP中item::select方法的典型用法代码示例。如果您正苦于以下问题:PHP item::select方法的具体用法?PHP item::select怎么用?PHP item::select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类item
的用法示例。
在下文中一共展示了item::select方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
if ($db->next_record()) {
alloc_redirect($TPL["url_alloc_item"] . "itemID=" . $db->f("itemID"));
}
} else {
//open the index
$index = new Zend_Search_Lucene(ATTACHMENTS_DIR . 'search/item');
$query = Zend_Search_Lucene_Search_QueryParser::parse($needle);
$hits = $index->find($needle);
$TPL["index_count"] = $index->count();
$TPL["hits_count"] = count($hits);
$p =& get_cached_table("person");
foreach ($hits as $hit) {
$d = $hit->getDocument();
$item = new item();
$item->set_id($d->getFieldValue('id'));
$item->select();
$row = array();
$row["idx"] = $hit->id;
$author = $item->get_value("itemAuthor");
$author and $author = " by " . $author;
$row["title"] = $item->get_id() . " " . $item->get_link() . $author;
$row["score"] = sprintf('%d%%', $hit->score * 100);
$row["desc"] = page::htmlentities($d->getFieldValue('desc'));
// get availability of loan
$db2 = new db_alloc();
$query = prepare("SELECT * FROM loan WHERE itemID = %d AND dateReturned='0000-00-00'", $item->get_id());
$db2->query($query);
if ($db2->next_record()) {
$loan = new loan();
$loan->read_db_record($db2);
if ($loan->have_perm(PERM_READ_WRITE)) {