Drupal でSQLを書く – example

Aug 13, 2015
AD:

nodeテーブルからtypeをWhereに入れてSELECT

field_data_field_package_periodテーブルから日付をWhereに入れてSELECT

field_data_field_package_periodテーブルからentity_idをINでSELECT

$results = db_select('field_data_field_package_level', 'fpl')
->fields('fpl', array('field_package_level_value'))
->condition('entity_id', array(1,2,3), 'IN')
->condition('field_package_level_value', 0, '!=')
->execute() Tags: ,

Related posts

AD:

No Comments, Comment or Ping

Reply to “Drupal でSQLを書く – example”

ARCHIVES