public function prepare($sql, $driver_options=array())
    {

        $md5 = md5($sql);

        if(isset($this->prepared_sql[$md5])){
            return $this->prepared_sql[$md5];
        }

        $stmt = parent::prepare($sql, $driver_options);
        $this->prepared_sql[$md5] = $stmt;
        return $stmt;
    }
public function prepare($sql, $driver_options=array())
    {

        $md5 = md5($sql);

        if(isset($this->prepared_sql[$md5])){
            return $this->prepared_sql[$md5];
        }

        $stmt = parent::prepare($sql, $driver_options);
        $this->prepared_sql[$md5] = $stmt;
        return $stmt;
    }
public function prepare ( $ sql , $ driver_options = array ( ) ) { $ md5 = md5 ( $ sql ) ; if ( isset ( $ this -> prepared_sql [ $ md5 ] ) ) { return $ this -> prepared_sql [ $ md5 ] ; } $ stmt = parent :: prepare ( $ sql , $ driver_options ) ; $ this -> prepared_sql [ $ md5 ] = $ stmt ; return $ stmt ; }
Used to prepare and store sql statements for value binding

@param string $sql
@return PDOStatement A PDO_statment instance
Used to prepare and store sql statements for value binding