I have 5 users in my database I want to get the first 3 data and send them a specific email. How can I get the remaining 2 users and sent them on another set of email
$sql = $conn->prepare('SELECT * FROM Users LIMIT 3');
$sql->execute();
while($result = $sql->fetch(PDO::FETCH_ASSOC)) {
mail sending codes...
}
DB: Users
id | Name | Email
1 | John | john@gmail.com
2 | Mark | mark@gmail.com
3 | Erik | erik@gmail.com
4 | Ryan | ryan@gmail.com
5 | Grey | grey@gmail.com