_db->select(); $select->from($this->_getPair('Cart'), 'transactionId'); $select->where('`Cart`.`accessCode` = ?', (string) $code); $id = $this->_db->fetchOne($select); } return $id; } /** * @param string $code * @return bool */ public function setIdByAccessCode($code) { $id = $this->getIdByAccessCode($code); if ($id) { $this->setPrimaryKey($id); return true; } return false; } }