method getColumns documentation in bbn\Db

Return columns' structure of a table as an array indexed with the fields names.

*

Example

X::dump($db->getColumns('table_users')); /* (array)[ "id" => [ "position" => 1, "null" => 0, "key" => "PRI", "default" => null, "extra" => "auto_increment", "signed" => 0, "maxlength" => "8", "type" => "int", ], "name" => [ "position" => 2, "null" => 0, "key" => null, "default" => null, "extra" => "", "signed" => 0, "maxlength" => "30", "type" => "varchar", ], "surname" => [ "position" => 3, "null" => 0, "key" => null, "default" => null, "extra" => "", "signed" => 0, "maxlength" => "30", "type" => "varchar", ], "address" => [ "position" => 4, "null" => 0, "key" => "UNI", "default" => null, "extra" => "", "signed" => 0, "maxlength" => "30", "type" => "varchar", ], ] function(string $table) { return $this->language->getColumns($table); }

Return columns' structure of a table as an array indexed with the fields names. 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.