I can get the column names for the table, but is there a way to get the default data value for each column?
Here is what I use to get table column names:
$q = $dbh->query("DESCRIBE tablename"); $table_fields = $q->fetchAll(PDO::FETCH_COLUMN); print_r($table_fields);
This prints an array of column names, but I'm also trying to get the default data value for each column name.
source share