Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Räumliche Daten in CakePHP speichern

konvertiere diese Zeile :

$this->data['Report']['position'] = $db->expression("GeomFromText('POINT(" . 
    $this->data['Report']['lat'] . " " . $this->data['Report']['lng'] . ")')");

zu :

$this->data['Report']['position'] = (object) $db->expression("GeomFromText('POINT(" .
     $this->data['Report']['lat'] . " " . $this->data['Report']['lng'] . ")')");

Es sollte funktionieren.