Hi Lluís, EntityFieldQuery is what you are after: http://api.scratch.drupal.org/api/drupal/includes--entity.inc/class/EntityFieldQuery/7 http://drupal.org/node/916776
Regards Steven Jones ComputerMinds ltd - Perfect Drupal Websites Phone : 024 7666 7277 Mobile : 07702 131 576 Twitter : darthsteven http://www.computerminds.co.uk On 22 March 2011 16:40, Lluís Forns <[email protected]> wrote: > I want to load a node using cck fields instead of nid or core fields. > > Is there a "no-sql" way of doing this? I have read that maybe I could > achieve it using views, but I think it would be an overkill. > > What I want to achieve is something like this: > > $inscripcio = node_load(array( > 'type' => 'inscripcio', > 'field_alumne' => $nid_alumne, > 'field_convocatoria' => $nid_convocatoria, > )); > > any hint? > > If I could get which tables use a cck type and how to join them, maybe > I could code a "generic" way to do this, so if cck-type is changed, > there is no problem. > > -- > *Les normes hi són perquè hi pensis abans de saltar-te-les > *La vida és com una taronja, què esperes a exprimir-la? > *Si creus que l'educació és cara, prova la ignorància. > *La vida és com una moneda, la pots gastar en el que vulguis però > només una vegada. > *Abans d'imprimir aquest missatge, pensa en el medi ambient. >
