In my table i have a column for spot name (place name) in which i have a string
like - City Bank Building.
i have my user interface in which i have one search box in that user can enter any keyword for searching.
now i want to search that keyword from the table column spot name which is a string.
so basically i want to extract a substring from the string which is stored in the database.
for example,
City Bank Building - this is the database string
Bank - my search keyword
any combination of the string which contains "Bank" as a word in the string should be display in the list.
this is my code,
switch($search_by){
case "spotname":
$sql_where_clause = "sname LIKE ' %" . $search_keyword."%'";
break;
}
anyone know how to do this?