Quick update:
Drupal doesn't create table like "field_data_<vocabulary machine name>"
But it creates table with "field_data_<CCK field name given to term
reference>"

:)

On Wed, Sep 7, 2011 at 2:05 AM, Deva <[email protected]> wrote:

> Thank you very much Mikey. You are right. I also not prefer querying the
> database. I'll have a look.
>
>
> On Tue, Sep 6, 2011 at 10:54 PM, Michael Prasuhn <[email protected]> wrote:
>
>> Deva,
>>
>> Rather than querying the base tables directly (which isn't a very good
>> idea, since Field API isn't meant to be used that way), you could use
>> EntityFieldQuery which is designed for just such a task.
>>
>> http://api.drupal.org/api/**drupal/includes--entity.inc/**
>> class/EntityFieldQuery/7<http://api.drupal.org/api/drupal/includes--entity.inc/class/EntityFieldQuery/7>
>>
>> -Mikey P
>>
>> Deva wrote:
>>
>>> Thanks Randy.
>>> I got the solution though.
>>>
>>> Drupal 7 creates new table for each vocabulary.
>>> look for table named "field_data_<vocabulary machine name>".
>>> Node - term relation is stored in that table.
>>>
>>>
>>> On Tue, Sep 6, 2011 at 6:06 PM, Randy Fay <[email protected]
>>> <mailto:[email protected]>> wrote:
>>>
>>>    I would imagine you'd want to use views (probably with views bulk
>>>    operations), which allows full control of this.
>>>
>>>    However, you may want to use access control, which is a lot more
>>>    flexible than the all-or-nothing published/unpublished status. You
>>>    may want to look at the Content Access + ACL modules.
>>>
>>>    -Randy
>>>
>>>
>>>    On Tue, Sep 6, 2011 at 8:14 AM, Deva <[email protected]
>>>    <mailto:[email protected]>**> wrote:
>>>
>>>        Hello Everyone,
>>>
>>>        I came across the situation where i want to show unpublished
>>>        content on the site. (For review kind of thing)
>>>        I am displaying nodes related to a taxonomy term using
>>>        taxonomy_select_nodes function.
>>>        The problem is, it only returns published nodes related to
>>>        particular taxonomy term.
>>>        Is there any other solution/function to get all nodes related to
>>>        a term, regardless of the node state (published/unpublished)?
>>>
>>>        Thanks in advance.
>>>
>>>        --
>>>        :DJ
>>>
>>>
>>>
>>>
>>>
>>>    --
>>>    Randy Fay
>>>    Drupal Module and Site Development
>>>    [email protected] <mailto:[email protected]>
>>>    +1 970.462.7450 <tel:%2B1%C2%A0%20970.462.**7450>
>>>
>>>
>>>
>>>
>>> --
>>> :DJ
>>>
>>>
>>>
>> --
>> __________________
>> Michael Prasuhn
>> 503.512.0822 office
>> [email protected]
>> http://mikeyp.net
>>
>
>
>
> --
> :DJ
>
>
>


-- 
:DJ

Reply via email to