1
I need to create two tables on the same page where in the first one will have only one client, in the case, the first of the list and in the second the other customers, the problem is that when I list the second table, the first customer also appears, and I need the second table list-if from the second customer, because when the customer of the first customer is met the page reloads and the first from the bottom rises, so successively.
What I tried to:
<?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 are the tables 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