public function genClause ($strName, $mixOptions, $strDefault = FALSE, $strSeparator = ', ')
	{

		// Set clause
		
		$strClause		= NULL;

		// If there are options
		
		if (isset ($mixOptions) && $mixOptions)
		{

			// Start the param
			
			$strClause	= $strName . ' ';

			// If array
			
			if (is_array ($mixOptions) && count ($mixOptions) > 0)
			{

				// join all order by clauses together
				
				$strClause .= implode ($strSeparator, $mixOptions);

			}
			
			// Else not array
			
			else
			{

				// Append clause
				
				$strClause	.= $mixOptions;

			}

		}
		
		// No options set but there is a default
		
		else if (FALSE !== $strDefault)
		{

			$strClause	= $strName . ' ' . $strDefault;

		}

		// If there is a clause
		
		if (NULL !== $strClause)
		{
			
			// Add space to the end of the clause
			
			$strClause .= ' ';
			
		}
		
		// Return clause
		
		return $strClause;

	}