public function codeMatches($price_rule_id, $code)
    {
        $sql = 'SELECT price_rule_id
                FROM price_rule
                WHERE code=? AND price_rule_id=? AND status=?';

        return (bool) $this->db->fetchColumn($sql, array($code, $price_rule_id, 1));
    }