public function EscapeSql($String, $FirstWordOnly = FALSE) {
      if (is_array($String)) {
         $EscapedArray = array();

         foreach ($String as $k => $v) {
            $EscapedArray[$this->EscapeSql($k)] = $this->EscapeSql($v, $FirstWordOnly);
         }

         return $EscapedArray;
      }
      // echo '<div>STRING: '.$String.'</div>';

      // This function may get "item1 item2" as a string, and so
      // we may need "`item1` `item2`" and not "`item1 item2`"
      if (ctype_alnum($String) === FALSE) {
         if (strpos($String, '.') !== FALSE) {
            $MungedAliases = implode('.', array_keys($this->_AliasMap)).'.';
            $TableName =  substr($String, 0, strpos($String, '.')+1);
            //echo '<div>STRING: '.$String.'</div>';
            //echo '<div>TABLENAME: '.$TableName.'</div>';
            //echo '<div>ALIASES: '.$MungedAliases.'</div>';
            // If the "TableName" isn't found in the alias list and it is a valid table name, apply the database prefix to it
            $String = (strpos($MungedAliases, $TableName) !== FALSE || strpos($TableName, "'") !== FALSE) ? $String : $this->Database->DatabasePrefix.$String;
            //echo '<div>RESULT: '.$String.'</div>';

         }

         // This function may get "field >= 1", and need it to return "`field` >= 1"
         $LeftBound = ($FirstWordOnly === TRUE) ? '' : '|\s|\(';

         $String = preg_replace('/(^'.$LeftBound.')([\w\d\-\_]+?)(\s|\)|$)/iS', '$1`$2`$3', $String);
         //echo '<div>STRING: '.$String.'</div>';

      } else {
         return "`{$String}`";
      }

      $Exceptions = array('as', '/', '-', '%', '+', '*');

      foreach ($Exceptions as $Exception) {
         if (stristr($String, " `{$Exception}` ") !== FALSE)
            $String = preg_replace('/ `('.preg_quote($Exception).')` /i', ' $1 ', $String);
      }
      return $String;
   }