public function bind($params, $types)
    {
        if (empty($params)) {
            return;
        }

        $anonymousParams = is_int(key($params)) ? true : false;
        $offset = 1;
        foreach ($params as $index => $value) {
            $type = null;
            if (isset($types[$index])) {
                $type = $types[$index];
            }
            if ($anonymousParams) {
                $index += $offset;
            }
            $this->bindValue($index, $value, $type);
        }
    }
public function bind($params, $types)
    {
        if (empty($params)) {
            return;
        }

        $anonymousParams = is_int(key($params)) ? true : false;
        $offset = 1;
        foreach ($params as $index => $value) {
            $type = null;
            if (isset($types[$index])) {
                $type = $types[$index];
            }
            if ($anonymousParams) {
                $index += $offset;
            }
            $this->bindValue($index, $value, $type);
        }
    }
public function bind ( $ params , $ types ) { if ( empty ( $ params ) ) { return ; } $ anonymousParams = is_int ( key ( $ params ) ) ? true : false ; $ offset = 1 ; foreach ( $ params as $ index => $ value ) { $ type = null ; if ( isset ( $ types [ $ index ] ) ) { $ type = $ types [ $ index ] ; } if ( $ anonymousParams ) { $ index += $ offset ; } $ this -> bindValue ( $ index , $ value , $ type ) ; } }
Binds a set of values to statement object with corresponding type.

@param array $params list of values to be bound
@param array $types list of types to be used, keys should match those in $params
@return void
Binds a set of values to statement object with corresponding type .