[development] node_load using cck fields

Michael Prasuhn mike at mikeyp.net
Tue Mar 22 20:28:02 UTC 2011

It's pretty clear that you did not read the linked article. It is 
perfectly safe to use CCKs API to find out what tables a field's data is 
stored in. How do you think that Views is able to get at the correct table?


Guillaume ! wrote:
> That will work in most cases, but if you ever re-use one of the fields
> of the date content type with another content type, the field will be
> moved to its own table (content_field_date). The safe way is really of
> using views, or node_load, but there are obvious scalability issues
> with foreach($a = node_load($nid++)), because they are really
> independant of the content_type current structure. See
> http://groups.drupal.org/node/10129 for more details.
> On 11-03-22 09:47 AM, Steve Edwards wrote:
>> Here is the magic incantation:
>> http://drewish.com/content/2010/06/correctly_accessing_cck_fields_in_sql_queries

Michael Prasuhn
503.512.0822 office
mike at mikeyp.net

More information about the development mailing list