Pix_Table_Search_Term
Pix_Table 基本所提供的 search 條件只有兩種條件,一個是 associate array ,一個是給字串條件。 不過有些 DB 是可以支援一些特殊條件的,例如 PostgreSQL 的 PostGIS 可以增加「找出某個(x, y)方圓1km的所有點」的條件, 這樣子 associate array 和字串條件都不夠使用,此時就可以使用 Pix_Table_Search_Term 了。
基本用法:
支援的 term_id:
location/distance-with-in
- 參數: string $latlon_column_name, array $lat_lon, int $distance
- 以 $latlon_column_name column 為搜尋條件,找出 $lat_lon 這個經緯度方圓內距離為 $distance 的所有點
- 支援 Adapter: Pix_Table_Db_Adapter_PgSQL
範例: