public function addFrom($tables) {
		if(!$tables)
			return $this;

		if(is_string($tables))
			$tables = explode(',', $tables);
		elseif(!is_array($tables))
			$tables = [$tables];
		foreach($tables as $k=>$tablestr) {
			if($tablestr instanceof static) {
				$table = $tablestr;
				$alias = $k;
			}
			elseif($tablestr instanceof Raw) {
				$table = $tablestr;
				$alias = $k;
			}
			else {
				$tablestr = trim($tablestr);

				preg_match('/(.*?) ([a-z_][a-zA-Z0-9_]*)?$/i', $tablestr, $matches);
				if(isset($matches[2])) {
					$alias = $matches[2];
					$table = $matches[1];
				}
				else
					$alias = $table = $tablestr;

				if(isset($this->tables[$alias]))
					throw new \Exception('Table alias '.$alias.' is already used.');
			}
			
			$this->tables[$alias] = $table;
		}

		return $this;
	}
public function addFrom($tables) {
		if(!$tables)
			return $this;

		if(is_string($tables))
			$tables = explode(',', $tables);
		elseif(!is_array($tables))
			$tables = [$tables];
		foreach($tables as $k=>$tablestr) {
			if($tablestr instanceof static) {
				$table = $tablestr;
				$alias = $k;
			}
			elseif($tablestr instanceof Raw) {
				$table = $tablestr;
				$alias = $k;
			}
			else {
				$tablestr = trim($tablestr);

				preg_match('/(.*?) ([a-z_][a-zA-Z0-9_]*)?$/i', $tablestr, $matches);
				if(isset($matches[2])) {
					$alias = $matches[2];
					$table = $matches[1];
				}
				else
					$alias = $table = $tablestr;

				if(isset($this->tables[$alias]))
					throw new \Exception('Table alias '.$alias.' is already used.');
			}
			
			$this->tables[$alias] = $table;
		}

		return $this;
	}
public function addFrom ( $ tables ) { if ( ! $ tables ) return $ this ; if ( is_string ( $ tables ) ) $ tables = explode ( ',' , $ tables ) ; elseif ( ! is_array ( $ tables ) ) $ tables = [ $ tables ] ; foreach ( $ tables as $ k => $ tablestr ) { if ( $ tablestr instanceof static ) { $ table = $ tablestr ; $ alias = $ k ; } elseif ( $ tablestr instanceof Raw ) { $ table = $ tablestr ; $ alias = $ k ; } else { $ tablestr = trim ( $ tablestr ) ; preg_match ( '/(.*?) ([a-z_][a-zA-Z0-9_]*)?$/i' , $ tablestr , $ matches ) ; if ( isset ( $ matches [ 2 ] ) ) { $ alias = $ matches [ 2 ] ; $ table = $ matches [ 1 ] ; } else $ alias = $ table = $ tablestr ; if ( isset ( $ this -> tables [ $ alias ] ) ) throw new \ Exception ( 'Table alias ' . $ alias . ' is already used.' ) ; } $ this -> tables [ $ alias ] = $ table ; } return $ this ; }
Add FROM tables.
@param string|array|dal $tables Separated by ,
@return DAL             $this
@api
Add FROM tables .