[development] Taxonomy_select_nodes quetion

Carl Wiedemann carl.wiedemann at gmail.com
Wed Jan 26 18:11:46 UTC 2011


On the API page, notice the effect of $pager -- it calls pager_query() with
10 as the limit.

You might consider using Views http://drupal.org/project/views for doing
this sort of thing.

On Wed, Jan 26, 2011 at 10:13 AM, bob brazeau <bobbrazeau at gmail.com> wrote:

> This is for verision 6 of Drupal.
> I have a taxonomy category with 11 results, but only the top 10 are
> showing up.  I am getting my results by
>  $result = taxonomy_select_nodes(array($tid), 'or', 0, FALSE, 'n.title
> asc');
>
>  Looked into the code for the select
>
> http://api.drupal.org/api/drupal/modules--taxonomy--taxonomy.module/function/taxonomy_select_nodes/6
>
>  and based on my parameters came up with the following query
>  $result = db_query("select distinct(n.nid), n.sticky, n.title,
> n.created from node n inner join term_node tn on n.vid=tn.vid where
> tn.tid = %d and n.status = 1 order by n.title asc",$tid);
>
>  which returns all 11 results.
>
>  I went into /admin/content/node-settings and upped the value from 10
> to 30, but there was no change.
>
> Then I changed the FALSE to TRUE in the original code and all 11
> results showed up.  Not sure why the result set was limited when
> paging was turned OFF.  Can anyone shed light on what was happening
> there?
>
> Thanks,
>
> Bob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110126/23452c6a/attachment.html 


More information about the development mailing list