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.
9 Answers
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."
-
5correct. it's
node_revisions
.body– RosarchAug 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).– RandellAug 16, 2009 at 15:02
-
-
-
1@claws, this answer is for Drupal 6, for Drupal 7 the body field is stored into field_data_body table.– YogeshJun 16, 2017 at 6:49
In Drupal 7 the body has been moved to the field_data_body table.
-
2In my Drupal 7 site, I can see the bodies of my contents in tables "field_data_body" and "field_revision_body". 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. Mar 3, 2012 at 18:45
-
What is the association between a node and
field_data_body
? The latter has nonid
orvid
column (at least not with that name) Dec 18, 2013 at 15:30 -
There is a colume entity_is in field_data_body that is reference of nid from node table Jul 22, 2016 at 1:43
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
Your content types body content is saved in field_data_body
and field_revision_body
tables.
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.
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.
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.
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.