so i am doing a AJAX search bar. For now i only know how to search for exact words. Example for my table
ID|Skillset|Description|
1|game|i love game
2|photography|i love to take photo
3|game|game is my forte
For now i have this query to search for exact word in the database
PHP
$sql = "SELECT userdatafiles.UserID,Name,Link,Title FROM userdatafiles JOIN users ON userdatafiles.UserID = users.UserID WHERE Skillsets = '$searchBar' GROUP BY UserID ORDER BY RAND()";
So if the user typed game, it will display all skillsets that matches game.
What i want to improve is that, instead of just searching into the Skill set column, i want to search for both Skillset and Description column. Instead of searching for exact matching words, i wan users to be able to type something like 'gam' and it will search in both Skillset & Description as long as there are words that contain 'gam' it will display out, example gam is a part of 'game', or a part of 'i love game'. Any ideas how i can do that?