Re: [symfony-users] Can someone help me translating this Doctrine snippet to Propel?

2010-03-14 Thread Jonathan Wage
function getValueFor($tableName, $id, $columnName) { $object = call_user_func_array(array($tableName.'Peer', 'retrieveByPk'), array($id)); return $object->{'get'.sfInflector::camelize($columnName)}; } I think something like this? - Jon On Sun, Mar 14, 2010 at 4:43 PM, Christian Schaefer w

[symfony-users] Can someone help me translating this Doctrine snippet to Propel?

2010-03-14 Thread Christian Schaefer
hi all, can somebody translate this simple function to use Propel instead of Doctrine? {{{ function getValueFor($tableName, $id, $columnName) { $table = Doctrine::getTable($tableName); $object = $table->find($id); return $object->$columnName; } }}} Thanks a lot! /Christian -- If you want