0

I have following classes

  • My_Table extends Zend_Db_Table_Abstract
  • My_Row extends Zend_Db_Table_Row_Abstract

I my table has a column of the type Point

var_dump($row->point);
string(25) "=
ףp@@=
ףp�^@"

How can I fetch the point column as text ("32.23,122.21") through these classes? The select should probably have

CONCAT( X( `point` ) , ',', Y( `point` ) ) AS point

But I don't know what methods or properties to override. I've already tried manually setting $_cols in My_Table to no avail.

Moak
  • 12,596
  • 27
  • 111
  • 166

1 Answers1

1

When creating an instance of Zend_Db_Table, you can specify to include custom columns..

$table_with_point = new Table_With_Point(array('point_coords' => "CONCAT( X( `point` ) , ',', Y( `point` ) )"));
boojer
  • 239
  • 2
  • 5