Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
geopoint
  • hi,
    how can i save point to db?
    my code :
                $entry              = Model_Geo::forge();
                $entry->point    = ???? (point =GeomFromText('POINT(18 -63)'))
                $entry->lat       = \Input::post('lat');
                $entry->long    = \Input::post('long');
                $entry->time    =\Input::post('time');
                $entry->date    = \Input::post('date');
                $entry->user_id = \Input::post('user');
                $entry->save();
    and i use geometry data type for point column and Float for lat, long
  • HarroHarro
    Accepted Answer
    Never did this with ORM before, but you can try with a DB expression:

    $entry->point = \DB::expr("POINT(18, -63)");


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion