From: Nicolas Boisselier Date: Mon, 18 Feb 2019 03:26:55 +0000 (+0000) Subject: www/dbq/dbq.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=920143cc97b982a182fafa955994396978b873d0;p=nb.git www/dbq/dbq.php --- diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index 0e5ada16..943baf41 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -258,6 +258,7 @@ class DbQ extends nb { $this->deniedUnless($this->perm >= self::READ); $fields_only = (string)$fields === '' ? [] : explode(',',$fields); + # NB 18.02.19: Replace numeric value with field's name $table_fields = array_keys($this->table->fields()); foreach ($fields_only as $k=>$v) { if (preg_match('/^(\d+)$/',$v,$m)) $fields_only[$k] = $table_fields[$v];