DB Query replaces %s inside LIKE operator I have one query like :

db_query("SELECT * FROM {foo} WHERE bar LIKE '%supply%' LIMIT %d,%d", 0, 10)

Now if I use db_query API it will replace %s with the argument supplied and resulting query will be like 

SELECT * FROM foo WHERE bar LIKE '0upply%' LIMIT 0, 0

Any ideas to overcome this ? I dont want to use mysql_query()

I am using temporarily _db_query()
You just need to escape % signs with another % sign in a Drupal db query:

db_query("SELECT * FROM {foo} WHERE bar LIKE '%%supply%%' LIMIT %d,%d", 0, 10);


If you wanted to use a placeholder it would be like so:

db_query("SELECT * FROM {foo} WHERE bar LIKE '%%%s%%' LIMIT %d,%d", 'supply', 0, 10);