How to find an article title for specific post So, I am new to drupal, and I am using a small pdo library to directly fetch from database list of articles, to display them on a page that is not running drupal. But, the articles are posted using drupal cms. 

My problem is that, also I am able to fetch the article content, node id ... but I can't seem to find the title of article itself. 

I looked in my table, and these are all the data I have. 

mysql&gt; describe field_data_body;
+--------------+------------------+------+-----+---------+-------+
| Field        | Type             | Null | Key | Default | Extra |
+--------------+------------------+------+-----+---------+-------+
| entity_type  | varchar(128)     | NO   | PRI |         |       |
| bundle       | varchar(128)     | NO   | MUL |         |       |
| deleted      | tinyint(4)       | NO   | PRI | 0       |       |
| entity_id    | int(10) unsigned | NO   | PRI | NULL    |       |
| revision_id  | int(10) unsigned | YES  | MUL | NULL    |       |
| language     | varchar(32)      | NO   | PRI |         |       |
| delta        | int(10) unsigned | NO   | PRI | NULL    |       |
| body_value   | longtext         | YES  |     | NULL    |       |
| body_summary | longtext         | YES  |     | NULL    |       |
| body_format  | varchar(255)     | YES  | MUL | NULL    |       |
+--------------+------------------+------+-----+---------+-------+
10 rows in set (0.00 sec)


Just as example, I am doing 

$db = new DB(...);
$stmt = $db-&gt;query("SELECT *, entity_id as id, body_value as content from field_data_body where entity_id &lt; 10  LIMIT 8"); 
$result = $stmt-&gt;fetchAll(); 

foreach($result as $row){
  echo $row['title']; //error. 
}
As with everything there are a few ways to do this. Here are a couple, if you know the node id.

Do a query on the node table:select title from node where nid = KNOWN_NODE_ID

Use a Drupal function:
$node = node_load(KNOWN_NODE_ID);
$nodeTitle = $node-&gt;title;