php - how to find all result with any keyword matched in mysql -
i have table called users. table has more 10 columns. want make search program return row if keyword match in string.
check attachment.. in attachment when trying search "rina" select * users first_name "%riaa%" or last_name '%rina%'
in condition getting result expected. but when try search '%rina sharma%' getting no result found. query searching whole keyword in each cell.
like
1st name have "rina sharma" => false
2nd name have "rina sharma" => false
i want either "rina"or "sharma" if keyword matched result should appear.
select * id c c.name regexp 'rina|sharma';
Comments
Post a Comment