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));
    }
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));
    }
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 ) ) ; }
Performs simple rule code validation
@param integer $price_rule_id
@param string $code
@return boolean
Performs simple rule code validation