system/classes/Db_MySQL.php
protected function getArrayItem($dataMember, $offset, $quote = true)
    {
        if(is_array($this->{$dataMember}[$offset])) {
            if (count($this->{$dataMember}[$offset]) == 3) {
                $item = $this->{$dataMember}[$offset];
                $column = $item[0];
                
                // Normally, Don't include column quotes because the column may be a function like:
                // COUNT(*) which doesn't work if it's entered as `COUNT(*)`.
                // However, in the case of "UPDATE table SET column = value", the column shouldn't be a 
                // function, so we want to quote it to avoid conflict with reserved MySQL names.
                if ($dataMember == 'updates') {
                    $column = '`'.$column.'`';
                }
                
                // If the value is string 'NULL', output without quotes and without cleaning.
                if ($item[2] === 'NULL') {
                    return $column.' '.$item[1]." ".$item[2]; 
                }
                else {
                    if($quote) {
                       return $column.' '.$item[1]." '".$this->clean($item[2])."'"; 
                    }
                    else {
                       return $column.' '.$item[1]." ".$this->clean($item[2]); 
                    } 
                }   
            }
            else {
                throw new \Exception("Cora's Query Builder class expects query components to be in an array with form [column, operator, value]");
            }
        }
        else {
            $item = $this->clean($this->{$dataMember}[$offset]);
            if ($dataMember == 'inserts') {
                $item = '`'.$item.'`';
            }
            return $item;
        }
    }
protected function getArrayItem($dataMember, $offset, $quote = true)
    {
        if(is_array($this->{$dataMember}[$offset])) {
            if (count($this->{$dataMember}[$offset]) == 3) {
                $item = $this->{$dataMember}[$offset];
                $column = $item[0];
                
                // Normally, Don't include column quotes because the column may be a function like:
                // COUNT(*) which doesn't work if it's entered as `COUNT(*)`.
                // However, in the case of "UPDATE table SET column = value", the column shouldn't be a 
                // function, so we want to quote it to avoid conflict with reserved MySQL names.
                if ($dataMember == 'updates') {
                    $column = '`'.$column.'`';
                }
                
                // If the value is string 'NULL', output without quotes and without cleaning.
                if ($item[2] === 'NULL') {
                    return $column.' '.$item[1]." ".$item[2]; 
                }
                else {
                    if($quote) {
                       return $column.' '.$item[1]." '".$this->clean($item[2])."'"; 
                    }
                    else {
                       return $column.' '.$item[1]." ".$this->clean($item[2]); 
                    } 
                }   
            }
            else {
                throw new \Exception("Cora's Query Builder class expects query components to be in an array with form [column, operator, value]");
            }
        }
        else {
            $item = $this->clean($this->{$dataMember}[$offset]);
            if ($dataMember == 'inserts') {
                $item = '`'.$item.'`';
            }
            return $item;
        }
    }
protected function getArrayItem ( $ dataMember , $ offset , $ quote = true ) { if ( is_array ( $ this -> { $ dataMember } [ $ offset ] ) ) { if ( count ( $ this -> { $ dataMember } [ $ offset ] ) == 3 ) { $ item = $ this -> { $ dataMember } [ $ offset ] ; $ column = $ item [ 0 ] ; // Normally, Don't include column quotes because the column may be a function like: // COUNT(*) which doesn't work if it's entered as `COUNT(*)`. // However, in the case of "UPDATE table SET column = value", the column shouldn't be a  // function, so we want to quote it to avoid conflict with reserved MySQL names. if ( $ dataMember == 'updates' ) { $ column = '`' . $ column . '`' ; } // If the value is string 'NULL', output without quotes and without cleaning. if ( $ item [ 2 ] === 'NULL' ) { return $ column . ' ' . $ item [ 1 ] . " " . $ item [ 2 ] ; } else { if ( $ quote ) { return $ column . ' ' . $ item [ 1 ] . " '" . $ this -> clean ( $ item [ 2 ] ) . "'" ; } else { return $ column . ' ' . $ item [ 1 ] . " " . $ this -> clean ( $ item [ 2 ] ) ; } } } else { throw new \ Exception ( "Cora's Query Builder class expects query components to be in an array with form [column, operator, value]" ) ; } } else { $ item = $ this -> clean ( $ this -> { $ dataMember } [ $ offset ] ) ; if ( $ dataMember == 'inserts' ) { $ item = '`' . $ item . '`' ; } return $ item ; } }
When given an array of the following format:
[item1, item2, item3]
This either returns a cleaned single item if "item" is a string,
OR returns a composite string of several variables if "item" is an array.

Single Items Example:
['table1', 'table2', 'table3'] when getting FROM clause

Items as Array Example:
In the case of Item being an array, it expects it to have exactly 3 values like so:
[column, operator, value]
These three offsets can be finagled to use whatever three pieces of data is appropriate.
Some examples of this in use are:
['column', '', 'DESC'] when getting ORDER BY clause. Middle offset is not used and left as blank string.
['name', '=', 'John'] when getting SET column = value clause.
When given an array of the following format : [ item1 item2 item3 ] This either returns a cleaned single item if item is a string OR returns a composite string of several variables if item is an array .