Hi All,
I have been struggling with Views API for the last 2 days and have decided to ask the community for some help.
Background: I have 3 custom tables in my database that are filled with data from CSV files from an external source, I am attempting to expose some columns of these tables as fields to Views so that I can display them on the website. These tables have no relationship to nodes, however I have a linkage table that relates the users table (uid) to the primary key of one of the tables - bringing that relationship into views will be needed later on when I overcome the hurdle of just getting fields to display.
The install schema for the table I'm trying to use:
$schema['mytable'] = array(
'description' => t(''),
'fields' => array(
'cust_id' => array(
'description' => t(''),
'type' => 'serial',
'length' => '11'
),
'cust_num' => array(
'description' => t(''),
'type' => 'int',
'length' => '11'
),
'cust_name' => array(
'description' => t(''),
'type' => 'varchar',
'default' => 'NULL',
'length' => '255'
),
),
'primary key' => array('cust_id'),
);
What I have coded up at the moment (I have tried lots of other things too, although this is probably the cleanest way to show my problem)