I have created the Views filter handler which work with the cck field. I want to get table alias from cck field that is already in Views fields. I try following code:

$data['my_module']['table']['join'] = array(
  'node' => array(
    'left_field' => 'vid',
    'field' => 'vid',
    'table' => 'content_type_test',
  ),  
);  
$data['my_module']['table']['group'] = t('My Module');
$data['my_module']['new_filter'] = array(
  'filter' => array(
    'title' => t('New Filter'),
    'table' => 'content_type_test',
    'handler' => 'views_handler_filter_new_filter',
  ),  
);

When I add my new filter and see on the preview query, They join table 2 times that form Views field 1 time and Views filter (from my filter) 1 time. That make multi-rows query, so consume many memory. Anybody have an idea how to fix it.

Sorry about my English. I hope you get it!
Thanks in advance.

Comments

Letharion’s picture

Status: Active » Postponed (maintainer needs more info)

Unfortunately I don't quite understand your question.
Is it about table aliases, or to much memory consumption?
If you can show your query, and point out what you think is wrong, that would be helpful.

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)