Use the find_in_set condition in the tp5 model query to query whether a field is included in the comma-separated data

$result = model('Friend')->where('FIND_IN_SET(:id,fid)',['id' => $id],['uid' => $result['id']])->find();

Friend: table name

fid: column name containing data separated by commas

$id: field name

Guess you like

Origin blog.csdn.net/qq_43737121/article/details/105935677