$db = $this->getDbTable()->getAdapter();
$expr = $db->quoteInto('seq_attained_value(?)', array('paths_id_seq', (int)$id));
$select = $db->select()->from(new Zend_Db_Expr($expr));
$db = $this->getDbTable()->getAdapter();
$expr = $db->quoteInto('seq_attained_value(?)', array('paths_id_seq', (int)$id));
$select = $db->select()->from(new Zend_Db_Expr($expr));