library/database/class.sqldriver.php
public function MapAliases($TableString) {
      // Make sure all tables have an alias.
      if(strpos($TableString, ' ') === FALSE) {
         $TableString .= " `$TableString`";
      }
      
      // Map the alias to the alias mapping array
      $TableString = trim(preg_replace('/\s+as\s+/i', ' ', $TableString));
      $Alias = strrchr($TableString, " ");
      $TableName = substr($TableString, 0, strlen($TableString) - strlen($Alias));
   
      // If no alias was specified then it will be set to the tablename.
      $Alias = trim($Alias);
      if(strlen($Alias) == 0) {
         $Alias = $TableName;
         $TableString .= " `$Alias`";
      }
      
      //$this->_AliasMap[$Alias] = $TableName;

      // Return the string with the database table prefix prepended
      return $this->Database->DatabasePrefix . $TableString;
   }
public function MapAliases($TableString) {
      // Make sure all tables have an alias.
      if(strpos($TableString, ' ') === FALSE) {
         $TableString .= " `$TableString`";
      }
      
      // Map the alias to the alias mapping array
      $TableString = trim(preg_replace('/\s+as\s+/i', ' ', $TableString));
      $Alias = strrchr($TableString, " ");
      $TableName = substr($TableString, 0, strlen($TableString) - strlen($Alias));
   
      // If no alias was specified then it will be set to the tablename.
      $Alias = trim($Alias);
      if(strlen($Alias) == 0) {
         $Alias = $TableName;
         $TableString .= " `$Alias`";
      }
      
      //$this->_AliasMap[$Alias] = $TableName;

      // Return the string with the database table prefix prepended
      return $this->Database->DatabasePrefix . $TableString;
   }
public function MapAliases ( $ TableString ) { // Make sure all tables have an alias. if ( strpos ( $ TableString , ' ' ) === FALSE ) { $ TableString .= " `$TableString`" ; } // Map the alias to the alias mapping array $ TableString = trim ( preg_replace ( '/\s+as\s+/i' , ' ' , $ TableString ) ) ; $ Alias = strrchr ( $ TableString , " " ) ; $ TableName = substr ( $ TableString , 0 , strlen ( $ TableString ) - strlen ( $ Alias ) ) ; // If no alias was specified then it will be set to the tablename. $ Alias = trim ( $ Alias ) ; if ( strlen ( $ Alias ) == 0 ) { $ Alias = $ TableName ; $ TableString .= " `$Alias`" ; } //$this->_AliasMap[$Alias] = $TableName; // Return the string with the database table prefix prepended return $ this -> Database -> DatabasePrefix . $ TableString ; }
Takes a provided table specification and parses out any table aliases
provided, placing them in an alias mapping array. Returns the table
specification with any table prefix prepended.

@param string $TableString The string specification of the table. ie.
"tbl_User as u" or "user u".
@return string
Takes a provided table specification and parses out any table aliases provided placing them in an alias mapping array . Returns the table specification with any table prefix prepended .