我可以在sql中使用“where'search'word',如'field'”吗?

I want to set the field to the right and the seach word to the left.

This is a normal SQL like search.

select id where id like '1'

I want to do like this.

select id where '1' like id

I 've tried these in fuelphp.

$query ->where($search_word,'like','field'); 

$query ->where($search_word,'like',DB::expr("CONCAT('%','field','%'")); 

$query ->where('field','like',DB::expr("CONCAT('%',$search_word,'%'")); 

These returned sql syntax error.

How wrong is these?

Try to specify like:

$query ->where(1,'like', $search_word);