protected function _parseDataToTable($data)
    {   
        
        $values = array();
        if (is_scalar($data)) {             // 1 scalar
            preg_match('/(.*)(\,|left\sjoin|inner\sjoin)+(.*)/i', $data, $matches);
            if ($matches) {
                $temp1 = $this->_parseDataToTable($matches[1]);
                $temp2 = $this->_parseDataToTable($matches[3]);
                $values[] = $temp1[0] . ' ' . $matches[2] . ' ' . $temp2[0];
            } else {
                $values[] = $this->formatTableName($data);
            }
        } elseif (is_array($data)) {        // 2 array
            foreach ($data as $key => $value) {
                
                if ((is_numeric($key) || empty($key)) && $value) {
                    $temp = $this->_parseDataToTable($value);
                    $values = array_merge($values, $temp);
                }
            }
        }
        
        return $values;
    }
protected function _parseDataToTable($data)
    {   
        
        $values = array();
        if (is_scalar($data)) {             // 1 scalar
            preg_match('/(.*)(\,|left\sjoin|inner\sjoin)+(.*)/i', $data, $matches);
            if ($matches) {
                $temp1 = $this->_parseDataToTable($matches[1]);
                $temp2 = $this->_parseDataToTable($matches[3]);
                $values[] = $temp1[0] . ' ' . $matches[2] . ' ' . $temp2[0];
            } else {
                $values[] = $this->formatTableName($data);
            }
        } elseif (is_array($data)) {        // 2 array
            foreach ($data as $key => $value) {
                
                if ((is_numeric($key) || empty($key)) && $value) {
                    $temp = $this->_parseDataToTable($value);
                    $values = array_merge($values, $temp);
                }
            }
        }
        
        return $values;
    }
protected function _parseDataToTable ( $ data ) { $ values = array ( ) ; if ( is_scalar ( $ data ) ) { // 1 scalar preg_match ( '/(.*)(\,|left\sjoin|inner\sjoin)+(.*)/i' , $ data , $ matches ) ; if ( $ matches ) { $ temp1 = $ this -> _parseDataToTable ( $ matches [ 1 ] ) ; $ temp2 = $ this -> _parseDataToTable ( $ matches [ 3 ] ) ; $ values [ ] = $ temp1 [ 0 ] . ' ' . $ matches [ 2 ] . ' ' . $ temp2 [ 0 ] ; } else { $ values [ ] = $ this -> formatTableName ( $ data ) ; } } elseif ( is_array ( $ data ) ) { // 2 array foreach ( $ data as $ key => $ value ) { if ( ( is_numeric ( $ key ) || empty ( $ key ) ) && $ value ) { $ temp = $ this -> _parseDataToTable ( $ value ) ; $ values = array_merge ( $ values , $ temp ) ; } } } return $ values ; }
table, use parse to from|update|delete|other table name
@param  array $data
@return array
table use parse to from|update|delete|other table name