コード例 #1
0
        $sql = "SELECT `id` FROM `tbl_authors` WHERE `" . $field . "` IN ('" . implode("', '", $bits) . "')";
        //break;
        //}
        $authors = $database->fetchCol('id', $sql);
        return is_array($authors) && !empty($authors) ? $authors : NULL;
    }
}
include_once TOOLKIT . '/class.authormanager.php';
$AuthorManager =& new AuthorManager($this->_Parent);
$author_ids = array();
if (is_array($this->dsParamFILTERS) && !empty($this->dsParamFILTERS)) {
    foreach ($this->dsParamFILTERS as $field => $value) {
        if (!is_array($value) && trim($value) == '') {
            continue;
        }
        $ret = __processAuthorFilter($field, $value, $this->_Parent->Database);
        if (empty($ret)) {
            $author_ids = array();
            break;
        }
        if (empty($author_ids)) {
            $author_ids = $ret;
            continue;
        }
        $author_ids = array_intersect($author_ids, $ret);
    }
    $authors = $AuthorManager->fetchByID(array_values($author_ids), $this->dsParamSORT, $this->dsParamORDER, $this->dsParamLIMIT, max(0, $this->dsParamSTARTPAGE - 1) * $this->dsParamLIMIT);
} else {
    $authors = $AuthorManager->fetch($this->dsParamSORT, $this->dsParamORDER, $this->dsParamLIMIT, max(0, $this->dsParamSTARTPAGE - 1) * $this->dsParamLIMIT);
}
if ((!is_array($authors) || empty($authors)) && $this->dsParamREDIRECTONEMPTY == 'yes') {
コード例 #2
0
        					break;*/
        //case DS_FILTER_OR:
        $sql = "SELECT `id` FROM `tbl_authors` WHERE `" . $field . "` IN ('" . implode("', '", $bits) . "')";
        //break;
        //}
        $authors = $database->fetchCol('id', $sql);
        return is_array($authors) && !empty($authors) ? $authors : NULL;
    }
}
$author_ids = array();
if (is_array($this->dsParamFILTERS) && !empty($this->dsParamFILTERS)) {
    foreach ($this->dsParamFILTERS as $field => $value) {
        if (!is_array($value) && trim($value) == '') {
            continue;
        }
        $ret = __processAuthorFilter($field, $value, Symphony::Database());
        if (empty($ret)) {
            $author_ids = array();
            break;
        }
        if (empty($author_ids)) {
            $author_ids = $ret;
            continue;
        }
        $author_ids = array_intersect($author_ids, $ret);
    }
    $authors = AuthorManager::fetchByID(array_values($author_ids), $this->dsParamSORT, $this->dsParamORDER, $this->dsParamLIMIT, max(0, $this->dsParamSTARTPAGE - 1) * $this->dsParamLIMIT);
} else {
    $authors = AuthorManager::fetch($this->dsParamSORT, $this->dsParamORDER, $this->dsParamLIMIT, max(0, $this->dsParamSTARTPAGE - 1) * $this->dsParamLIMIT);
}
if ((!is_array($authors) || empty($authors)) && $this->dsParamREDIRECTONEMPTY == 'yes') {