sql >> Databasteknik >  >> RDS >> Mysql

Spara rumslig data i CakePHP

konvertera den här raden :

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

till :

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

Det borde fungera.



  1. Underhålla/uppdatera postordning i mysql

  2. Hur DAYOFYEAR() fungerar i MariaDB

  3. Introduktion till temporära tabeller i SQL Server

  4. MySQL Limit LEFT JOIN Subquery efter att ha gått med