2 Commits

Author SHA1 Message Date
acce5b2b17 Fixed condition expressions 2022-09-28 19:26:31 -03:00
fc372b56c1 FIX: str_contains, JOIN 2022-09-28 19:23:23 -03:00

View File

@ -111,8 +111,8 @@ abstract class Select extends Query implements SelectInterface
$str []= $join;
continue;
}
if (!str_contains('and ', strtolower($join)) and !str_contains('or ', strtolower($join))) {
$str []= "AND {$join}";
if (!str_contains(strtolower($join), 'join')) {
$str []= "JOIN {$join}";
continue;
}
$str []= $join;
@ -144,7 +144,7 @@ abstract class Select extends Query implements SelectInterface
$str []= $condition;
continue;
}
if (!str_contains('and ', strtolower($condition)) and !str_contains('or ', strtolower($condition))) {
if (!str_contains(strtolower($condition), 'and') and !str_contains(strtolower($condition), 'or')) {
$str []= "AND {$condition}";
continue;
}