[development] node_load using cck fields

Guillaume ! guillaume at resist.ca
Tue Mar 22 16:47:31 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

D6: Not really. You can node_load (with reset=1) on all of the nodes
and check them. Or use a view object, that feels like an overkill, but
its way more configurable.


On 11-03-22 09:40 AM, Lluís Forns 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.
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCAAGBQJNiNKjAAoJEIudqlYAGRshkYwQALRZDpQbLdcjqc50gDw/b2jB
r6LWyV2zJuNAkPNlwd1iDn2d7ahazUWYAfANRuJh0fzk01uTySxn9T2JmxCmMnbA
BFRHtAUloAWeRug0IZP3I2wIfLJGhQBBheyjbOe3Cjd+IKT76NiXI7kr/a6glf2k
Zo9rwO6jYZZVc66nkfH1zYQBEqaYYH8pKYB8m0VRH3VTpFJ/k75KdPzX3Q0yXSIT
WvZfRqnRkgr2CFvDacFRgk+ICEsB8V/ZkfPNr67wcEHjG/ETVSnatzquBhsxThgO
m93sgh7eIuIj5cg6knUPUmht68ETJD0i8N5Zu35JPZpoOLwzkzYU7hQt3YEohpvS
bdOZ99Kd4ePlekCpr2xz/qcTl1WuixHcAirgL64QwnGCmzzISTaUWtJdQzOHsNVx
oEAWpagHhECVJqZ8dXB96u2jkRtpz3XA0nIGRiZPTP+pQfEOPpH9pOYBnxd5qiL3
nA7fXjcPwaskOoHRhwUbvxzb3Df+bCpYUXGHOHNcpc61uqGKo+wVz7PmqikjZx1p
myITa2htRAzp0kK7IsIMOdxmJL0dk6y3HjJRdyYsyFjgVMwP4KhhhHlRaEDvOzgG
RKwqOaKNSjs1ZlT984WHA65nqdW4L7rmW4N6cu6Pf4Ej76TdC157e0D/3t46I8zm
gErz+Uo5zL6jOEII/ioO
=JxdM
-----END PGP SIGNATURE-----

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110322/c96144fb/attachment.html 


More information about the development mailing list