PHP PDO MySQL query LIKE -> multiple keywords

后端 未结 3 1149
清酒与你
清酒与你 2020-12-04 04:06

I have a users table in MySQL and would like a search by name. Right now I have the following code:



        
3条回答
  •  甜味超标
    2020-12-04 04:49

    $words = explode(" ", $search);
    
    $i = 0;
    while($words[i] != null)
    {
        //Query where name LIKE words[i]
    }
    

提交回复
热议问题