예제 #1
0
파일: PgSQL.php 프로젝트: yslbc/twcompany
 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());
 }
예제 #2
0
파일: SQL.php 프로젝트: pixnet/pixframework
 public function getSQLConditionByTerm(Pix_Table_Search_Term $term, $table)
 {
     throw new Pix_Table_Exception('Unsupport Pix_Table_Search_Term: ' . $term->getType());
 }