public function getSQLConditionByTerm(Pix_Table_Search_Term $term, $table = null) { switch ($term->getType()) { case 'location/distance-with-in': $arguments = $term->getArguments(); $column = $arguments[0]; $latlon = $arguments[1]; $distance = $arguments[2]; return "ST_DWithin(" . $this->column_quote($column) . ", ST_GeographyFromText('POINT(" . floatval($latlon[1]) . " " . floatval($latlon[0]) . ")'), " . intval($distance) . ")"; } throw new Pix_Table_Exception('Unsupport Pix_Table_Search_Term: ' . $term->getType()); }
public function getSQLConditionByTerm(Pix_Table_Search_Term $term, $table) { throw new Pix_Table_Exception('Unsupport Pix_Table_Search_Term: ' . $term->getType()); }
/** * search a special Term * * @link http://framework.pixnet.net/group/table/search_term.html * @param string $term_type * @param mixed $term_arguments... * @access public * @return Pix_Table_ResultSet */ public function searchTerm() { $args = func_get_args(); $term = new Pix_Table_Search_Term(); if (count($args)) { $term->setType(array_shift($args)); $term->setArguments($args); } return $this->search($term); }