我尝试将数据保存到 CI 中的表中
喜欢:
$geomatchinfo = 数组 (
[Latitude] => 45.8556528
[Longitude] => 22.9565858
[Geom] => GeomFromText('Point(45.855653 22.956586)')
[Radius] => 15.0
[Mode] => white
[Name] => dsad
[Description] => asd
[Formatted] => asdasd, Deva, Romania
[Address] => a:5:{s:7:"address";s:6:"asdasd";s:5:"route";s:6:"asdasd";s:4:"city";s:4:"Deva";s:5:"state";s:9:"Hunedoara";s:7:"country";s:7:"Romania";}
)
Geomatch::create($geomatchinfo);
但它给了我错误
致命错误:未捕获的异常 'ActiveRecord\DatabaseException' 带有消息 '22003, 1416,无法从您发送到 D:\xampp\htdocs\tr-fresh\sparks\php-activerecord\0.0 中的 GEOMETRY 字段的数据中获取几何对象。 2\供应商\php-activerecord\lib\Connection.php:312
我有数据库字段名称“Geom”数据类型“几何”。