Search a word in records |
Hi
I have many records that contain fields Title,ID,Code I need search a word in Title fields My example records is : Title ID Code 1- Laptop Apple 1 2 2- Laptop Asus 2 3 3- Writer DVD 3 4 4- Top Website Template 4 5 Now I need search "top" in this records If use like,it return record 1,2,4 But i want to return only record 4,because i search only top word not parse of any word example laptop How do i use query for this?
Not sure if this will help but is a good start.
How To Improve Database Searches with Full-Text Search in MySQL 5.6 on Ubuntu 16.04 What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Use regex. Haven't tested with Query Builder, so can't give you an example with that.
Code: mysql> SELECT 'a word a' REGEXP '[[:<:]]word[[:>:]]'; -> 1
|
Welcome Guest, Not a member yet? Register Sign In |