Magento select single record from db

    public function getSingleRecord($userId)
    {
        return $this->getCollection()
            ->addFieldToFilter('user_id', $userId)
            ->getFirstItem();
    }

Leave a Reply