function Comment::query
Return value
\Drupal\Core\Database\Query\SelectInterface
Overrides SqlBase::query
File
- 
              core/
modules/ comment/ src/ Plugin/ migrate/ source/ d6/ Comment.php, line 21  
Class
- Comment
 - Drupal 6 comment source from database.
 
Namespace
Drupal\comment\Plugin\migrate\source\d6Code
public function query() {
  $query = $this->select('comments', 'c')
    ->fields('c', [
    'cid',
    'pid',
    'nid',
    'uid',
    'subject',
    'comment',
    'hostname',
    'timestamp',
    'status',
    'thread',
    'name',
    'mail',
    'homepage',
    'format',
  ]);
  $query->innerJoin('node', 'n', 'c.nid = n.nid');
  $query->fields('n', [
    'type',
    'language',
  ]);
  $query->orderBy('c.timestamp');
  return $query;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.