关于tp6模糊查询两种方式

eg1:
$where = "course_id = " . $data['courseId'] . " ";
$where .= " and  title LIKE '%" . $data['keyword'] . "%' ";

eg2:

$where[] = ['name|title', 'LIKE', '%' . $data['keyword'] . '%'];

你可能感兴趣的:(php)