E
E
Eugene Kubesh2014-05-24 20:58:21
PostgreSQL
Eugene Kubesh, 2014-05-24 20:58:21

How to write a geometry field using AR?

We have YII and Postgis
How to write the geometry to the database?
tried like this -

$adverts = new Adverts();
$adverts->geom = "ST_GeomFromText('POINT(57.230032 49.719473)',4326)";

But it does not work, the question is how to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MaxHero, 2014-05-28
@Basters

$adverts = new Adverts();
$adverts->geom = new CDbExpression("ST_GeomFromText('POINT(57.230032 49.719473)',4326)");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question