How to use the LOWER function in a Drupal query? I want the query like below: 

select * from tbl where LOWER(name) = $name

My current query is:

$resultArr = db_select('adbanner', 'n')
    -&gt;fields('n')
    -&gt;condition(LOWER('n.blog_title'), $page, '=')
    -&gt;execute()
    -&gt;fetchAll(); 


But it doesn't work.

How should I write this type of query?
You can use LIKE instated of LOWER.

OR write something

$query-&gt;where('LOWER(n.blog_title) = :page', array(':page' =&gt; $page));


Refer Using SQL functions in conditionals in Drupal 7 db_select()