Pdo get column names

PHP’s Pdo doesnt have a default columnname function. After searching Google I found that many people seem to be looking for this function. You can get the columnnames with an easy query to the schema:

$querystring = "SELECT * FROM INFORMATION_SCHEMA.Columns where TABLE_NAME = $table";

Related Blogs

  • Related Blogs on
  1. Alexander1 - trackback on July 8, 2011 at 3:03 pm

Leave a Comment

Trackbacks and Pingbacks: