count() 方法 public int count(string $query=NULL) $query string 搜索语句, 若传入 null 使用默认语句, 调用后会还原默认排序方式 如果搜索语句和最近一次 search 的语句一样, 请改用 getLastCount 以提升效率 最大长度为 80 字...
... $conns[] = $conn; } } } if (count($conns) > 1) { shuffle($conns); } for ($i = 0; $i < count($conns); $i++) { try { $this->_search = new XSSearch($conns[$i], $this); $this->_search->setCha...
...c function getData(){ if ($this->dataPos === null || $this->dataPos === count($this->dataList)) { $this->dataPos = 0; $this->dataList = $this->getDataList(); if (!is_array($this->dataList) || count($this->dataList) === 0) { $this->deinit(); $this->dataLi...
...t = array(); try { if ($query === null) { if ($this->_count > 0 && $this->_count > ceil($this->getDbTotal() * 0.001)) { return $ret; } $query = $this->cleanFieldQuery($this->_query); } if (empty($query) || strpos($query, ':') !=...
...isset($_SERVER['argv']) ? $_SERVER['argv'] : array(); for ($i = 0; $i < count($params); $i++) { if ($params[$i] === '--') { for ($i = $i + 1; $i < count($params); $i++) { $result['-'][] = $params[$i]; } break; } elseif ($params[$i][0] ...
...st(); } $item = json_decode($line, true); if (!is_array($item) || count($item) === 0) { switch (json_last_error()) { case JSON_ERROR_DEPTH: $error = ' - Maximum stack depth exceeded'; break; case JSON_ERROR_CTRL_CHAR: ...
...>limit == 0) { $sql = preg_replace('/SELECT\s+.+?FROM\s/i', 'SELECT COUNT(*) AS count FROM ', $sql); $res = $this->db->query1($sql); $this->limit = $res['count'] - $this->offset; }}
... } return $this;} 设置默认搜索语句 用于不带参数的 count 或 search 以及 terms 调用 可与 addWeight 组合运用
...->line . "\n"; } return false; } $this->line++; if (count($item) === 1 && is_null($item[0])) { if ($this->inCli) { echo "WARNING: invalid csv line #" . $this->line . "\n"; } $this->invalidLines++; return $this->getDataList(); } retu...
...st(); } $item = json_decode($line, true); if (!is_array($item) || count($item) === 0) { switch (json_last_error()) { case JSON_ERROR_DEPTH: $error = ' - Maximum stack depth exceeded'; break; case JSON_ERROR_CTRL_CHAR: ...