我有一个sql查询:
SELECT `entity_type` FROM `field_data_field_project_team_member` WHERE field_project_team_member_uid=30
我想让它写在db_select()中。 如何在db_select中编写??
答案 0 :(得分:0)
我经历了各种教程,发现drupal formate为它编写了一个查询:
$sub_qry = db_select('field_data_field_project_team_member', 't');
$sub_qry->fields('t', array('entity_id'));
$sub_qry->where("t.field_project_team_member_uid = 30");
希望它对其他人有用。