Open kk3377 opened 6 years ago
Hi, Currency im having trouble saving a value of POINT to Geometry column with no avail. Here is the xml schema.
<table name="user" phpName="User"> <column name="geo_location" type="GEOMETRY" phpType="string" required="true"/> </table>
I have tried to insert the value in way shown below but both failed too.
$user->setGeoLocation('GeomFromText("POINT(101.732339 3.002545)")');
$polygon = geoPHP::load('POINT(101.732339 3.002545)','wkt'); $user->setGeoLocation($polygon->asBinary());
Returning error message is "SQLSTATE[22003]: Numeric value out of range: 1416 Cannot get geometry object from data you send to the GEOMETRY field"
"SQLSTATE[22003]: Numeric value out of range: 1416 Cannot get geometry object from data you send to the GEOMETRY field"
Any help is appreciated. Thanks
Is someone able to make a PR here with suggested changes?
Hi, Currency im having trouble saving a value of POINT to Geometry column with no avail. Here is the xml schema.
I have tried to insert the value in way shown below but both failed too.
$user->setGeoLocation('GeomFromText("POINT(101.732339 3.002545)")');
Returning error message is
"SQLSTATE[22003]: Numeric value out of range: 1416 Cannot get geometry object from data you send to the GEOMETRY field"
Any help is appreciated. Thanks