Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Jul 11 '11 at 10:39

This question came from our site for professional and enthusiast programmers.

    
To understand where all the fields of a node are stored in Drupal 7: see drupal.stackexchange.com/questions/68515/… –  claws Feb 11 at 18:17

9 Answers 9

up vote 21 down vote accepted

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."

share|improve this answer
1  
correct. it's node_revisions.body –  Rosarch Aug 16 '09 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 Aug 16 '09 at 15:02
    
The webdevgeeks.com link is broken. –  reprogrammer Nov 27 '11 at 23:49
    
For which version of drupal is this answer correct? –  claws Feb 11 at 18:15

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

share|improve this answer
2  
In my Drupal 7 site, I can see the bodies of my contents in tables "field_data_body" and "field_revision_body". –  reprogrammer Nov 27 '11 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. –  Scott Evernden Mar 3 '12 at 18:45
    
Not exactly correct. The body text is stored in the value column of a field called body. This by default is stored in the body_value column of the field_data_body table. However, nothing stops you from using, say MongoDB to store the data in the body field (almost nothing: the standard profile creates it in SQL, so you better use minimal if you want to use MongoDB to save a painful migration later). –  chx Dec 4 '12 at 18:52
    
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) –  Explosion Pills Dec 18 '13 at 15:30

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

share|improve this answer

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

share|improve this answer

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

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

protected by kiamlaluno Aug 27 '12 at 14:56

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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