标签: drupal drupal-7
有人可以告诉我一个例子我应该如何使用drupal 7 db_like函数进行简单的查询?
答案 0 :(得分:2)
$result = db_select('person', 'p') ->fields('p') ->condition('name', db_like($prefix) . '%', 'LIKE') ->execute() ->fetchAll();
取自this page。