lib/db/cortex.php
protected function _sql_left_join($skey, $sTable, $fkey, $fTable) {
		if (is_array($fTable))
			list($fTable,$fTable_alias) = $fTable;
		$skey = $this->db->quotekey($skey);
		$sTable = $this->db->quotekey($sTable);
		$fkey = $this->db->quotekey($fkey);
		$fTable = $this->db->quotekey($fTable);
		if (isset($fTable_alias)) {
			$fTable_alias = $this->db->quotekey($fTable_alias);
			return 'LEFT JOIN '.$fTable.' AS '.$fTable_alias.' ON '.$sTable.'.'.$skey.' = '.$fTable_alias.'.'.$fkey;
		} else
			return 'LEFT JOIN '.$fTable.' ON '.$sTable.'.'.$skey.' = '.$fTable.'.'.$fkey;
	}
protected function _sql_left_join($skey, $sTable, $fkey, $fTable) {
		if (is_array($fTable))
			list($fTable,$fTable_alias) = $fTable;
		$skey = $this->db->quotekey($skey);
		$sTable = $this->db->quotekey($sTable);
		$fkey = $this->db->quotekey($fkey);
		$fTable = $this->db->quotekey($fTable);
		if (isset($fTable_alias)) {
			$fTable_alias = $this->db->quotekey($fTable_alias);
			return 'LEFT JOIN '.$fTable.' AS '.$fTable_alias.' ON '.$sTable.'.'.$skey.' = '.$fTable_alias.'.'.$fkey;
		} else
			return 'LEFT JOIN '.$fTable.' ON '.$sTable.'.'.$skey.' = '.$fTable.'.'.$fkey;
	}
protected function _sql_left_join ( $ skey , $ sTable , $ fkey , $ fTable ) { if ( is_array ( $ fTable ) ) list ( $ fTable , $ fTable_alias ) = $ fTable ; $ skey = $ this -> db -> quotekey ( $ skey ) ; $ sTable = $ this -> db -> quotekey ( $ sTable ) ; $ fkey = $ this -> db -> quotekey ( $ fkey ) ; $ fTable = $ this -> db -> quotekey ( $ fTable ) ; if ( isset ( $ fTable_alias ) ) { $ fTable_alias = $ this -> db -> quotekey ( $ fTable_alias ) ; return 'LEFT JOIN ' . $ fTable . ' AS ' . $ fTable_alias . ' ON ' . $ sTable . '.' . $ skey . ' = ' . $ fTable_alias . '.' . $ fkey ; } else return 'LEFT JOIN ' . $ fTable . ' ON ' . $ sTable . '.' . $ skey . ' = ' . $ fTable . '.' . $ fkey ; }
assemble SQL join query string
@param string $skey
@param string $sTable
@param string $fkey
@param string|array $fTable
@return string
assemble SQL join query string