core/classes/PDO.class.php
public function set($q, $args){

        if(is_array($args) && isset($args['raw'])){
            $q = implode($args['raw'],explode('?',$q,2));;
        }//if
        else if(is_array($args)){

            $first = array_keys($args);
            $first = array_shift($first);

            if(!is_numeric($first)){
                return $this->setAssociativeArrayPlaceHolders($q,$args);
            }//if

            return $this->setQuestionMarkPlaceHolders($q,$args);

        }//if
        else {
            $q = implode($this->prepareType($args), explode('?', $q, 2));
        }//el

        return $q;

    }
public function set($q, $args){

        if(is_array($args) && isset($args['raw'])){
            $q = implode($args['raw'],explode('?',$q,2));;
        }//if
        else if(is_array($args)){

            $first = array_keys($args);
            $first = array_shift($first);

            if(!is_numeric($first)){
                return $this->setAssociativeArrayPlaceHolders($q,$args);
            }//if

            return $this->setQuestionMarkPlaceHolders($q,$args);

        }//if
        else {
            $q = implode($this->prepareType($args), explode('?', $q, 2));
        }//el

        return $q;

    }
public function set ( $ q , $ args ) { if ( is_array ( $ args ) && isset ( $ args [ 'raw' ] ) ) { $ q = implode ( $ args [ 'raw' ] , explode ( '?' , $ q , 2 ) ) ; ; } //if else if ( is_array ( $ args ) ) { $ first = array_keys ( $ args ) ; $ first = array_shift ( $ first ) ; if ( ! is_numeric ( $ first ) ) { return $ this -> setAssociativeArrayPlaceHolders ( $ q , $ args ) ; } //if return $ this -> setQuestionMarkPlaceHolders ( $ q , $ args ) ; } //if else { $ q = implode ( $ this -> prepareType ( $ args ) , explode ( '?' , $ q , 2 ) ) ; } //el return $ q ; }
Bind passed variables into a query string and do proper type checking
and escaping before binding.


@param string        $q      The query string.
@param string|array  $args   The variables to bind to the $q.

@return string               The $q with $args bound into it.

@throws \Disco\exceptions\DBQuery When the number of arguements doesn't match the numebr of `?`
placeholders.
Bind passed variables into a query string and do proper type checking and escaping before binding .