24 May
2012
24 May
'12
10:28 p.m.
I have an existing module I'm trying to convert to DBTNG and have a condition I need a suggestion on. Original statement is something like SELECT mt.myvar FROM {mytable} mt WHERE mystring LIKE '%%%s%%'; I want to change it to db_select('mytable', 'mt') ->fields('mt', array('myvar')) ->condtion('mystring', '%:mystring%', LIKE) ->execute(); The problem is condition() only takes three parameters, what would you suggest to use to replace :mystring? I'm using t() but that seems like a misuse of it. -- Earnie -- https://sites.google.com/site/earnieboyd