Making custom fields available to views module I have gone through tons of reading... I even went into drupal archivess looking for help :(

I have defined my own content types and fields as well as my own db tables.
I want to be able to display these fields using views module in drupal 6.

This is the coding I have done so far:

function svm_mail_views_tables() {
  //Define the groups table
  $table['svm_mail_groups'] = array(
      'name' =&gt; 'svm_mail_groups',
      'join' =&gt; array(
          'left' =&gt; array(
              'table' =&gt; 'node',
              'field' =&gt; 'nid',
              ),
          'right' =&gt; array(
              'field' =&gt; 'nid',
              ),
          ),
      'fields' =&gt; array(
          'group_id' =&gt; array(
              'name' =&gt; t('SVM: Group ID'),
              'help' =&gt; t('The group id'),
              'sortable' =&gt; TRUE,
              ),
          ),
      'sorts' =&gt; array(
          'group_id' =&gt; array(
              'name' =&gt; t('Group ID'),
              'help' =&gt; t('The Group ID')
              ),
          ),
      );
  return $table;
}


I still don't have this available in my views module when building a view.

Can anyone help me out here and tell where I'm going wrong?

Thanks in advance.
If you want to add custom database tables in a view, you need to let views know about it by invoking hook_views_data() http://blog.menhir.be/2008/10/22/expose-database-fields-to-views-in-a-custom-drupal-module/

There is also documentation for this within the views module.

It looks like you are on the right track but your function name is _tables() instead of _data().