我正在尝试从我的一个表中选择用户数据行。我只想要数组中具有primary_key(user_id)的行。我怎样才能做到这一点?
创建数组的查询:
$suggestions_query= "
SELECT *
FROM relations
WHERE user1= '$user_id'
AND status = 1;
";
$suggestions_array= mysqli_query($connect, $suggestions_query);
查询获取用户数据:
$search_query= "
SELECT *
FROM users
WHERE fname LIKE '%".$fname."%'
AND lname LIKE '%".$lname."%'"
AND IN ARRAY <!-- Code in Question
$search_result= mysqli_query($connect, $search_query)