Pdo get column names

March 1st, 2010 § 0

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

Where am I?

You are currently viewing the archives for Monday, March 1st, 2010 at westworld: a webmasters best friend.