MySQL: Like with comma and points

53 views Asked by At

I got a row with a floating number like 39.93

Now I would like to perform a search; in this case the input "39.93" should result in a match AND the input "39,93" should also match.

At the moment I got the following code:

$query->where('(a.id LIKE ' . $search . ' OR a.number LIKE ' . $search . 'OR sum LIKE ' .  $search . ' OR userid LIKE ' . $search . ' OR c.lastname LIKE ' . $search . ' OR c.firstname LIKE ' . $search . ')');

In this case I'm looking for "sum" to match on "39,93", too.

How can I do that?

0

There are 0 answers