I need to create two tables on the same page where the first one will have only one client, in the case the first one in the list and the second one the other clients, the problem is that when the second table is ready, the first client also appears, and I need the second table to list itself from the second client, because when the client of the first one is serviced the page reloads and the first one from the bottom rises, so on.
What I've tried:
<?php
session_start();
require 'conexao.php';
$conexao = conexao::getInstance();
$sql = 'SELECT id_agenda, hr_agendamento ,nome_cliente ,realizado FROM agenda
WHERE nome_cliente = "nome_cliente " and realizado ="N"
limit 1
';
$stm = $conexao->prepare($sql);
$stm->execute();
$clientes = $stm->fetchAll(PDO::FETCH_OBJ);
$conexao2 = conexao::getInstance();
$sql = 'SELECT id_agenda, hr_agendamento ,nome_cliente ,realizado FROM agenda
WHERE nome_cliente = "nome_cliente " and realizado ="N"
limit 3
';
$stm = $conexao2->prepare($sql);
$stm->execute();
$clientes2 = $stm->fetchAll(PDO::FETCH_OBJ);
?>
How the tables are getting:
TABELA1
ID HORARIO CLIENTE REALIZADO
1 07:00 MARIA NAO
TABELA2
ID HORARIO CLIENTE REALIZADO
1 07:00 MARIA NAO
2 07:00 JOAO NAO
3 07:00 CARLOS NAO