@@ 517-521 (lines=5) @@ | ||
514 | } elseif (!$this->isEmpty($field)) { |
|
515 | if ($this->get($field) instanceof Ajde_Db_Function) { |
|
516 | $sqlSet[] = $field.' = '.(string) $this->get($field); |
|
517 | } elseif ($this->getTable()->getFieldProperties($field, 'type') === Ajde_Db::FIELD_TYPE_SPATIAL) { |
|
518 | $pointValues = explode(' ', (string) parent::_get($field)); |
|
519 | $sqlSet[] = $field.' = PointFromWKB(POINT('.str_replace(',', '.', |
|
520 | (float) $pointValues[0]).','.str_replace(',', '.', (float) $pointValues[1]).'))'; |
|
521 | } else { |
|
522 | $sqlSet[] = $field.' = ?'; |
|
523 | $value = parent::_get($field); |
|
524 | if (is_float($value)) { |
|
@@ 589-594 (lines=6) @@ | ||
586 | if ($this->get($field) instanceof Ajde_Db_Function) { |
|
587 | $sqlFields[] = $field; |
|
588 | $sqlValues[] = (string) $this->get($field); |
|
589 | } elseif ($this->getTable()->getFieldProperties($field, 'type') === Ajde_Db::FIELD_TYPE_SPATIAL) { |
|
590 | $sqlFields[] = $field; |
|
591 | $pointValues = explode(' ', (string) parent::_get($field)); |
|
592 | $sqlValues[] = 'PointFromWKB(POINT('.str_replace(',', '.', |
|
593 | (float) $pointValues[0]).','.str_replace(',', '.', (float) $pointValues[1]).'))'; |
|
594 | } else { |
|
595 | $sqlFields[] = $field; |
|
596 | $sqlValues[] = '?'; |
|
597 | $value = parent::_get($field); |