As always there is more than one way to do it! As you are using MySQL you can also use SQL queries to get the same info. In the case of columns you can also get the metadata about the coumn, the column type and such. Read the MySQL manual which is readily available online.