Fahad Bhatti Fahad Bhatti - 1 year ago 72
MySQL Question

search partial string with white spaces in mysql

My table structure is like this

products_options_id | products_options_values_name |
544127 | Silver 925 Chains as per Gram |

this is my table structure but for search dynamically I have only "Silver 925 Chains" for search in this colomn But I got empty result set.

SELECT * FROM `products_options_values`
WHERE `products_options_values_name` LIKE '%Silver 925 Chains%'

Is there any other way to search partial string

Answer Source

check this, hope it will help you

SELECT * FROM `products_options_values`
WHERE MATCH(products_options_values_name)  AGAINST ('Silver 925 Chains' IN BOOLEAN MODE)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download