devmonster
devmonster

Reputation: 1739

get mysql table columns description

I am trying to get my table's columns description I tried fetch_fields() but it doesn't fetch the description (just name, type, length ...)

  $finfo = $result->fetch_fields();
                foreach ($finfo as $val) {
                    if (in_array($val->name, $columns['names'])){
                        $ths .= '<th scope="col" id="'.$val->name.'">'.$val->name. '</th>';
                    }
                }

Upvotes: 0

Views: 1121

Answers (1)

eggyal
eggyal

Reputation: 125835

You can fetch COLUMN_COMMENT from INFORMATION_SCHEMA.COLUMNS.

Upvotes: 4

Related Questions