} // Extract any aliases that might exist. We use this information
// in the protectIdentifiers to know whether to add a table prefix
$this->
trackAliases($table);
if (!
is_bool($escape)) { $escape =
$this->db->protectIdentifiers;
} if (!
$this->
hasOperator($cond)) { $cond = ' USING (' .
($escape ?
$this->db->
escapeIdentifiers($cond) :
$cond) . ')';
} elseif ($escape === false
) { $cond = ' ON ' .
$cond;
} else { // Split multiple conditions
if (preg_match_all('/\sAND\s|\sOR\s/i',
$cond,
$joints, PREG_OFFSET_CAPTURE
)) { $conditions =
[];
$joints =
$joints[0
];
array_unshift($joints,
['', 0
]);
for ($i =
count($joints) - 1,
$pos =
strlen($cond);
$i >= 0;
$i--
) {