Drupal - Using LIKE in db_query in D7
Try this.
$sql = 'SELECT sid, score FROM {search_index} WHERE word LIKE :term';
$result = db_query($sql, array(':term' => '%' . db_like($search_term)));
Try this.
$sql = 'SELECT sid, score FROM {search_index} WHERE word LIKE :term';
$result = db_query($sql, array(':term' => '%' . db_like($search_term)));