【问题标题】:Print SQL Statement for Drupal 7 entities打印 Drupal 7 实体的 SQL 语句
【发布时间】:2023-03-06 15:32:01
【问题描述】:

如何打印sql语句

   $entities = $query
    ->entityCondition('entity_type', 'node')
    ->propertyCondition('type', "page")
    ->propertyCondition('uid', $user->uid)
    ->fieldCondition('field_item_r1', 'value', $title)
    ->addTag('debug')->execute();```

Please help me to print the sql statement

【问题讨论】:

标签: drupal-7 drupal-modules


【解决方案1】:

你可以使用(string) $query(如果可能我更喜欢这种方法)或添加->addTag('debug')

【讨论】:

    最近更新 更多