Merge #18233 - Fix #18212 - Query Builder doesn't replace a table name with it's alias in the WHERE block
Fixes: #18212 Pull-request: #18233 Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
commit
61374f4696
@ -33,7 +33,10 @@ function getFormatsText () {
|
||||
}
|
||||
|
||||
function generateCondition (criteriaDiv, table) {
|
||||
var query = '`' + Functions.escapeBacktick(table.val()) + '`.';
|
||||
const tableName = table.val();
|
||||
const tableAlias = table.siblings('.table_alias').val();
|
||||
|
||||
var query = '`' + Functions.escapeBacktick(tableAlias === '' ? tableName : tableAlias) + '`.';
|
||||
query += '`' + Functions.escapeBacktick(table.siblings('.columnNameSelect').first().val()) + '`';
|
||||
if (criteriaDiv.find('.criteria_rhs').first().val() === 'text') {
|
||||
var formatsText = getFormatsText();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user