Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There's a lot of code in webform_entity_install() that looks like it was provide values for the newly created 'bundle' column but because of a funky test of an empty array it never executes. I didn't actually try it because it looked like a really convoluted way of going about it.
Before you ask for a DBTNG version of the query compare it to the elegant SQL string:
$query = db_select('webform_submissions', 'ws');
$query->innerJoin('node', 'n', 'ws.nid = n.nid');
$query->distinct()
->fields('ws', array('sid'))
->fields('n', array('type'))
->condition('ws.bundle', NULL, 'IS NULL');
$query->innerJoin('node', 'n', 'ws.nid = n.nid');
$query->execute();
Comment | File | Size | Author |
---|---|---|---|
webform_entity.patch | 1.93 KB | drewish |
Comments
Comment #1
tizzo CreditAttribution: tizzo commentedGood call, this is much cleaner.
Committed, thanks!