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.

1 Answer 1

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` ) )"));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.