MySQL搜索双重货币格式

I have a PHP Based App that stores invoices entered by the user. Currently I have the invoice amount stored in a MySQL database tables as a double like so:

+------+--------------+--------------+----------------+----------------+-------------+-----------+---------------+-------------+-------------+-----------------+
| id   | date_entered | invoice_date | invoice_number | invoice_amount | client_type | unique_id | supplier_type | supplier_id | category_id | childcare_hours |
+------+--------------+--------------+----------------+----------------+-------------+-----------+---------------+-------------+-------------+-----------------+
|    1 | 1411098397   | 1411048800   | 123            |           0.01 |           0 |       137 |             0 |         139 |           5 |            NULL |
|    2 | 1412123404   | 1416920400   | 5093           |            130 |           0 |       168 |             0 |          19 |          18 |            NULL |
|    3 | 1412125933   | 1412085600   | 000            |             79 |           0 |       151 |             0 |         177 |           8 |            NULL |
|    4 | 1412645652   | 1412600400   | 000            |           60.8 |           0 |       104 |             0 |         179 |           9 |            NULL |
|    5 | 1412647563   | 1409320800   | 804560         |          225.5 |           0 |        18 |             0 |         174 |          10 |            NULL |

I am also using DataTables toorganise the data. I am using Server Side Processing to perform the data lookup to return as JSON.

The issue I am having is that the User is attempting to search by price eith by typing $123 or 123.50 This is not working as the SQL is being genrated like so: SELECT * FROM invoices WHERE invoice_amount LIKE "%$123%";

This is obviosuly failing due to the data being stored in the database as a double.

My Question is, is there a way to make the SQL (or Maybe PHP) search for the correct value no matter what the client types in?

I don't think there is any generic solution for the problem that you are facing but yeah you can remove the special characters like $ etc. from the beginning or end of the invoice amount to be placed in the query. Moreover I'll recommend that you should use functions as round in PHP as well as MySQL in the best possible fashion rather than using the LIKE statement. Using LIKE statement is absolutely incorrect in this situation.

You can try query without "$"

SELECT * FROM invoices WHERE invoice_amount LIKE "%123%";