I have made a cck node type and added a date field to it (eg name: duedate). I now need to retrieve the stored dates for a nod eof that type from the database, but there are no tables to retreive it from.

However, when i create a second cck node type, and add that same date field to it, a table for that date field gets created in the database, with the date values stored in it (node_data_field_duedate).

The only thing is that when i delete this 2nd uneeded cck node type, the table is dropped too.

Comments

reqIUm’s picture

Info on setup:

Version: lastest dev for 4.7
Field: date
Widget: selector
Timezone: none
Multiple: none
Required: no

karens’s picture

Status: Active » Closed (works as designed)

I think this is just a misunderstanding of how CCK stores data. If you have a field that is used in a single content type, the data is stored in a table like 'node_content_example'. If you share that field with another content type, the data gets moved out of the 'node_content_example' table and into a table like 'node_data_field_duedate'. If you drop the second content type, it is no longer a shared field and the data gets moved back to the first table.

This is the way CCK stores data and the date module has no control over it. See more explanations in the CCK Handbook at http://drupal.org/node/101723.