Closed (cannot reproduce)
Project:
Views (for Drupal 7)
Version:
6.x-2.12
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Feb 2011 at 12:40 UTC
Updated:
4 Apr 2011 at 20:11 UTC
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
Comment #1
Letharion commentedUnfortunately 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.
Comment #2
esmerel commented