From the second query, I want to get users whose id are not in the first query. Please how do i run this? Below is what I have done so far. The final goal is to get IDs in this format in the first query Example: "1", "2","3" etc and this IDs should not be part of the second second query.
$followpeople = $conne->prepare('SELECT thisuser from followerstable where ids = :ids ');
$followpeople->execute(array("ids "=>$ids )); $followers = $followpeople->fetchAll(PDO::FETCH_ASSOC);
$users = $conne->prepare(" SELECT * FROM usersdb LEFT JOIN followerstable p ON r.ids = p.ids where r.ids NOT IN ('" . implode("', '", $followers["thisuser"])."') order by rand() LIMIT 3;");