method getFieldsList documentation in bbn\Db\Languages\Sql

Returns an array of fields for the given table(s).

Example

X::dump($db->getFieldsList("table_users")); // (array) ['table_users.username', 'table_users.name'] function($tables) { $res = []; if (!\is_array($tables)) { $tables = [$tables]; } foreach ($tables as $t){ $model = $this->getColumns($t); if (!is_array($model)) { $this->error('Impossible to find the table '.$t); throw new \Exception(X::_('Impossible to find the table ').$t); } foreach (array_keys($model) as $f){ $res[] = $this->colFullName($f, $t); } } return $res; }

Returns an array of fields for the given table(s). BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.