52

In the node table, you'll find everything except the actual body. Where can I find this body text? I'm assuming it's being stored as a blob somewhere.

1

9 Answers 9

42

I don't have a running drupal installation here, but I asked myself this very question a couple of weeks ago, and it took time to find the answer.

If I remember correctly, the body of the node is stored in the table that is used to keep the "revisions" of the node. I am not sure what its name is, but it should be something like "node_revision" or "node_revisions."

5
  • 5
    correct. it's node_revisions.body
    – Rosarch
    Commented Aug 16, 2009 at 15:00
  • Just to add... the purpose of separating the body of the node is to allow the devs to create as many different content types as they want and have just one table containing all the node_id's. Revisions, which include the body, are on separate table(s).
    – Randell
    Commented Aug 16, 2009 at 15:02
  • The webdevgeeks.com link is broken. Commented Nov 27, 2011 at 23:49
  • For which version of drupal is this answer correct?
    – claws
    Commented Feb 11, 2014 at 18:15
  • 1
    @claws, this answer is for Drupal 6, for Drupal 7 the body field is stored into field_data_body table.
    – Yogesh
    Commented Jun 16, 2017 at 6:49
58

In Drupal 7 the body has been moved to the field_data_body table.

4
  • 2
    In my Drupal 7 site, I can see the bodies of my contents in tables "field_data_body" and "field_revision_body". Commented Nov 27, 2011 at 23:59
  • This is true only if you have content types that include a body field (same as any other non-title field). Polls, for example, don't have one. Commented Mar 3, 2012 at 18:45
  • What is the association between a node and field_data_body? The latter has no nid or vid column (at least not with that name) Commented Dec 18, 2013 at 15:30
  • There is a colume entity_is in field_data_body that is reference of nid from node table Commented Jul 22, 2016 at 1:43
9

It's the "node_revisions" table, in Drupal 5.

9

In Drupal 6, content of the node's body is saved in 'node_revisions' table under 'body' field.

node_revisions.body

In Drupal 7, content of the node's body is saved in 'field_data_body' table under 'body_value' field. In case content revisions are there then it also saves the data in 'field_revision_body' table under 'body_value' field.

field_data_body.body_value

field_revision_body.body_value

In Drupal 8, content of the node's body is saved in 'node__body' table under 'body_value' field. In case content revisions are there then it also saves the data in 'node_revision__body' table under 'body_value' field.

node__body.body_value

node_revision__body.body_value

6

Your content types body content is saved in field_data_body and field_revision_body tables.

3

This is the SQL you would use (MySQL client):

SELECT node.nid,node.vid,type,node.title, body 
FROM node join node_revisions ON node.nid = node_revisions.nid
WHERE node.title = 'some title';

So yes, the answer is the "node_revisions" table in Drupal 6.

3

In Drupal 7, the node body is found in field_data_body and field_revision_body. New fields added using CCK (which is added to core in Drupal 7) are found in field_config and field_config_instance. In Drupal6, the node body is stored at node_revisions and fields created are saved at content_node_field and content_node_field_instance.

1

I have created few new content types, and for them, the body or the description goes to column field_description_value of table content_type_<type_name> where type_name is the new content type's name.

1

In Drupal 7 its in field_revision_body .. if you describe that table you will see theres a col for Body summary and its a longtext type.

Not the answer you're looking for? Browse other questions tagged or ask your own question.