<font face="verdana,sans-serif">Thank you very much Mikey. You are right. I also not prefer querying the database. I'll have a look.<br></font><div><font class="Apple-style-span" face="verdana, sans-serif"><br></font></div>
<div><font class="Apple-style-span" face="verdana, sans-serif"><br></font><div class="gmail_quote">On Tue, Sep 6, 2011 at 10:54 PM, Michael Prasuhn <span dir="ltr"><<a href="mailto:mike@mikeyp.net">mike@mikeyp.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Deva,<br>
<br>
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.<br>
<br>
<a href="http://api.drupal.org/api/drupal/includes--entity.inc/class/EntityFieldQuery/7" target="_blank">http://api.drupal.org/api/<u></u>drupal/includes--entity.inc/<u></u>class/EntityFieldQuery/7</a><br>
<br>
-Mikey P<br>
<br>
Deva wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Thanks Randy.<br>
I got the solution though.<br>
<br>
Drupal 7 creates new table for each vocabulary.<br>
look for table named "field_data_<vocabulary machine name>".<br>
Node - term relation is stored in that table.<br>
<br>
<br>
On Tue, Sep 6, 2011 at 6:06 PM, Randy Fay <<a href="mailto:randy@randyfay.com" target="_blank">randy@randyfay.com</a><br></div><div class="im">
<mailto:<a href="mailto:randy@randyfay.com" target="_blank">randy@randyfay.com</a>>> wrote:<br>
<br>
I would imagine you'd want to use views (probably with views bulk<br>
operations), which allows full control of this.<br>
<br>
However, you may want to use access control, which is a lot more<br>
flexible than the all-or-nothing published/unpublished status. You<br>
may want to look at the Content Access + ACL modules.<br>
<br>
-Randy<br>
<br>
<br>
On Tue, Sep 6, 2011 at 8:14 AM, Deva <<a href="mailto:devendra.in@gmail.com" target="_blank">devendra.in@gmail.com</a><br></div><div class="im">
<mailto:<a href="mailto:devendra.in@gmail.com" target="_blank">devendra.in@gmail.com</a>><u></u>> wrote:<br>
<br>
Hello Everyone,<br>
<br>
I came across the situation where i want to show unpublished<br>
content on the site. (For review kind of thing)<br>
I am displaying nodes related to a taxonomy term using<br>
taxonomy_select_nodes function.<br>
The problem is, it only returns published nodes related to<br>
particular taxonomy term.<br>
Is there any other solution/function to get all nodes related to<br>
a term, regardless of the node state (published/unpublished)?<br>
<br>
Thanks in advance.<br>
<br>
--<br>
:DJ<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Randy Fay<br>
Drupal Module and Site Development<br></div>
<a href="mailto:randy@randyfay.com" target="_blank">randy@randyfay.com</a> <mailto:<a href="mailto:randy@randyfay.com" target="_blank">randy@randyfay.com</a>><br>
<a href="tel:%2B1%20%20970.462.7450" value="+19704627450" target="_blank">+1 970.462.7450</a> <tel:%2B1%C2%A0%20970.462.<u></u>7450><br>
<br>
<br>
<br>
<br>
--<br>
:DJ<br>
<br>
<br>
</blockquote><font color="#888888">
<br>
-- <br>
__________________<br>
Michael Prasuhn<br>
<a href="tel:503.512.0822" value="+15035120822" target="_blank">503.512.0822</a> office<br>
<a href="mailto:mike@mikeyp.net" target="_blank">mike@mikeyp.net</a><br>
<a href="http://mikeyp.net" target="_blank">http://mikeyp.net</a><br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br>:DJ<br><br><br>
</div>