mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 14:16:39 +02:00
Consider value of %n array as identifier
This commit is contained in:
committed by
David Grudl
parent
0b2cb3c6e4
commit
2ae6535899
@@ -239,7 +239,7 @@ final class DibiTranslator extends DibiObject
|
|||||||
case 'n': // key, key, ... identifier names
|
case 'n': // key, key, ... identifier names
|
||||||
foreach ($value as $k => $v) {
|
foreach ($value as $k => $v) {
|
||||||
if (is_string($k)) {
|
if (is_string($k)) {
|
||||||
$vx[] = $this->identifiers->$k . (empty($v) ? '' : ' AS ' . $v);
|
$vx[] = $this->identifiers->$k . (empty($v) ? '' : ' AS ' . $this->identifiers->$v);
|
||||||
} else {
|
} else {
|
||||||
$pair = explode('%', $v, 2); // split into identifier & modifier
|
$pair = explode('%', $v, 2); // split into identifier & modifier
|
||||||
$vx[] = $this->identifiers->{$pair[0]};
|
$vx[] = $this->identifiers->{$pair[0]};
|
||||||
|
Reference in New Issue
Block a user