I am trying to find out which ids in an array are already registered or updated in the database. hOW can i customize my query to add array of ids $ids
and make query to check for all the ids in the array if
1- They are Registered And their visibility is 1 and their update_time > :update_time
Here is the code
function GetOnlineContacts()
{
try {
$conn = $this->GetDBConnection();
$update_time = time() - 120;
$ids = array($_POST['ids']);
$statement = $conn->prepare('SELECT linkedInId FROM users WHERE update_time > :update_time AND visibility = 1');
$statement->bindParam(':update_time', $update_time, PDO::PARAM_STR);
$statement->execute();
$conn = null;
} catch(PDOException $e) {
throw $e;
}
}