2

There's no single function that will extract the value for you, but field_info_field() will get you an array that contains the data: $info = field_info_field('field_foo'); if (isset($info['columns']['value']['length'])) { // Do something with $info['columns']['value']['length'] } It it's a core text field, value will always be the name of the column you ...


2

In Drupal 8 bundle fields are configuration. This looks like you still have the field storage configured. In this case export configuration: drush cex remove the field storage: rm field.storage.node.field_example.yml and import configuration again: drush cim


1

Ok, yeah, I feel a bit silly now and was making this too difficult. There is a module for this for Drupal 8! I was able to accomplish what I needed with Views Custom Table. Thank you prkos for the comment.


1

You're not selecting the default database for the new connection. Try: $select = Database::getConnection('default', 'requestDB')->select('request'); $select->addExpression('Count(requestID)', 'rec_count'); $select->condition('dateCreated','DATE_SUB(CURRENT_DATE, INTERVAL 30 DAY)', '>='); $select->condition('ek_borrowerID','111'); $select->...


Only top voted, non community-wiki answers of a minimum length are eligible