method getPrimary documentation in bbn\Db\Languages\Sql

Return primary keys of a table as a numeric array.

Example

X::dump($db-> get_primary('table_users')); // (array) ["id"] function(string $table) { if (($keys = $this->getKeys($table)) && isset($keys['keys']['PRIMARY'])) { return $keys['keys']['PRIMARY']['columns']; } return []; }

Return primary keys of a table as a numeric array. 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.