kevin mcvey Tue Oct 04 16:55:32 -0400 2011

Subject: Get columns names

How can i retrieve the column names of a table? Tried looking through the forums but don't see a way to search. I have a table called Customers and a model called Customer.

class Customer extends ActiveRecord\Model{
static $primary_key = 'customer_id';
static $table_name = 'Customers';

if I exec Customer::all(); I get all records from the Customers table. I tried Customer::$columns and Customer::query_column_info() to get the column names but they just error out.

kevin mcvey Tue Oct 04 17:11:46 -0400 2011

Looks like i answered my own question.