Example:
db_query('select x from {table} where x like "%%%s%"', $string);
Another way
nevets - October 9, 2006 - 03:56
If you define the thing you are search for like
$pattern = '%' . $somevalue . '%';
and do your query something like
$results = db_query("SELECT .... WHERE field LIKE '%s'", $pattern);
you get rid of the need for the pairs of % signs.
1 comment:
I prefer the repair damage sql database application, developed by another company. I believe that it is the fastest way to open corrupted documents of specified format
Post a Comment