[development] With the Tid get last node

Da Costa Alcindo Alcindo.DaCosta at edipresse.ch
Wed Jun 4 12:44:53 UTC 2008


Hi,

I found a solution, I make a complaint directly into the database, if it can help someone;)

$query = "SELECT vqh_node.nid, vqh_node.title, vqh_node.created AS vqh_node_created_created FROM vqh_node vqh_node LEFT JOIN vqh_term_node vqh_term_node ON vqh_node.nid = vqh_term_node.nid LEFT JOIN vqh_term_data vqh_term_data ON vqh_term_node.tid = vqh_term_data.tid WHERE (vqh_term_node.tid = '$term->tid') ORDER BY vqh_node_created_created DESC LIMIT 0,1";

Da Costa Alcindo

-----Message d'origine-----
De : development-bounces at drupal.org [mailto:development-bounces at drupal.org] De la part de Da Costa Alcindo
Envoyé : mercredi, 4. juin 2008 14:18
À : development at drupal.org
Objet : Re: [development] With the Tid get last node

	
I already use a view to retrieve all term id, and now I would like to just doing research to find the first Nest good category.


-----Message d'origine-----
De : development-bounces at drupal.org [mailto:development-bounces at drupal.org] De la part de Doug Green
Envoyé : mercredi, 4. juin 2008 13:11
À : development at drupal.org
Objet : Re: [development] With the Tid get last node

use views for this

select block, return 1 node
filter by taxonomy
sort by created date DESC


Da Costa Alcindo wrote:
> Hi, 
>
>
>
> I am currently developing a module that displays a block with the last
> article in each category.
> Is what someone has already sought to retrieve the last article from a
> tid?
>
>  
>
> With a function like taxonomy_get_last_node($tid) ??
>
>  
>
> Cheers,
>
> Da Costa Alcindo
>
>
>   


-- 
Doug Green
douggreen at douggreenconsulting.com
904-583-3342

Bringing Ideas to Life with Software Artistry and Invention...



More information about the development mailing list