If thinkphp uses a certain string to query all records in the data table whose fields contain this string
滿天的星座
滿天的星座 2017-05-18 10:45:54
0
1
469

public function Search_clients($client_str)

{
    
     $sql = 'SELECT * WHERE FIND_IN_SET($client_str,desc)';
     $condition = $this->query($sql);
    
}


写的sql语句不对   
desc是数据表的字段名
$client_str是字段值    

Beginner to learn PHP, please help me solve my doubts

滿天的星座
滿天的星座

reply all(1)
阿神

Where is your watch name? . Also, you have to look at the tp manual for the query method.
For example:
$User = M("User"); // Instantiate the User object
$User->where('type=1 AND status=1')->select();

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template