I've a Mysql db table column which name is notesUpdate
. In this column data are contain like this:
$string = "{ASUSIBBIR}09-27-2014 19:38 PM alex : hmm..{ASUSIBBIR}{ASUSIBBIR}09-27-2014 20:04
PM alex : note here..{ASUSIBBIR}{ASUSIBBIR}
Now I want to search in this column using sql
query. I'm using following query
to search..
$getSearch = "my join query............";
if($ad_noteterm){
$getSearch .= "AND LOCATE('$ad_noteterm', cd.notesUpdate)";
}
Using this query
I can get result but problem is I want to search without following Text..
{ASUSIBBIR}09-27-2014 19:38 PM alex :
So Search result should be hmm.. or note here if i search on it. I've no idea what is the Sql query should be ?
Without db table column I can search to string using following regular expression
..
$match[0] = '/\{ASUSIBBIR\}(.+?)\s:\s/';
$match[1] = '/\{ASUSIBBIRsss\}/';
$haystack = preg_replace($match, '', $string);
BUT HOW CAN I USE THIS IN SQL QUERY TO GET THE RESULT ?
Thank You!!