Welcome Guest, Not a member yet? Register   Sign In
Databases: searching for a word in entries containing multiple words using 'like'
#3

In the example below I have a 'names' table and I want to find all names that contain' Taylor':

PHP Code:
$sql = ("SELECT * FROM `names` WHERE` name` LIKE '%Taylor%' ORDER BY `id` ASC"); 

The percentage symbol '%' indicates that the search must be carried out in both directions, that is: from left to right and the reverse.
Reply


Messages In This Thread
RE: Databases: searching for a word in entries containing multiple words using 'like' - by wdeda - 05-13-2021, 05:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB