1

I have a custom field for storing educational data. A person's degree is stored as either Btech or B.Tech or B.Tech. so what should I give in search option so that I can get all 3 in my result in a single search?

1

You can use basic pattern valid in LIKE operator of sql where clause.

For Eg - Using %tech% would result in all three rows.

Similarly you can use [, ], and _ symbols.

To find more about search strings - see Pattern Matching in MySQL (AFAIK you can use only LIKE patterns here not REGEXP).

  • did you mean B%tech% in order not to get eg MATech as a result? – petednz - fuzion Jun 23 '17 at 20:35
  • yes, that would work, B%tech% will list any value starting with B followed by some chars and then tech <some chars> which will exclude MATech from the result – jitendra - fuzion Jun 25 '17 at 6:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.