public function addNamedPlaceholderValue(string $placeholderName, $value, int $dataType = PDO::PARAM_STR) : self
    {
        if ($this->usingUnnamedPlaceholders === true) {
            throw new InvalidQueryException('Cannot mix unnamed placeholders with named placeholders');
        }

        $this->usingUnnamedPlaceholders = false;
        $this->parameters[$placeholderName] = [$value, $dataType];

        return $this;
    }
public function addNamedPlaceholderValue(string $placeholderName, $value, int $dataType = PDO::PARAM_STR) : self
    {
        if ($this->usingUnnamedPlaceholders === true) {
            throw new InvalidQueryException('Cannot mix unnamed placeholders with named placeholders');
        }

        $this->usingUnnamedPlaceholders = false;
        $this->parameters[$placeholderName] = [$value, $dataType];

        return $this;
    }
public function addNamedPlaceholderValue ( string $ placeholderName , $ value , int $ dataType = PDO :: PARAM_STR ) : self { if ( $ this -> usingUnnamedPlaceholders === true ) { throw new InvalidQueryException ( 'Cannot mix unnamed placeholders with named placeholders' ) ; } $ this -> usingUnnamedPlaceholders = false ; $ this -> parameters [ $ placeholderName ] = [ $ value , $ dataType ] ; return $ this ; }
Adds a named placeholder's value
Note that you cannot use a mix of named and unnamed placeholders in a query

@param string $placeholderName The name of the placeholder (what comes after the ":")
@param mixed $value The value of the placeholder
@param int $dataType The PDO constant that indicates the type of data the value represents
@return self For method chaining
@throws InvalidQueryException Thrown if the user mixed unnamed placeholders with named placeholders
Adds a named placeholder s value Note that you cannot use a mix of named and unnamed placeholders in a query