I would like to know if it is possible to perform 3 simultaneous searches on the same table. The situation is as follows: I have a table that contains the columns:
Car, Material, IP, date
Then I have to search:
1 - Quantos carros foram cadastrados na ultima hora
2 - Quantos Materiais foram cadastrados na última 2 horas
3 - Quantos Ips acessaram nos últimos 30 minutos
It is possible for me to perform these 3 simultaneous searches, where I have to return the number of data found in each of them.
The way I do it is as follows:
$conn->prepare("QUERY 1");
$conn->prepare("QUERY 2");
$conn->prepare("QUERY 3");
I call the prepare 3 times, I would like to minimize this, call only once and return the number of data separated by the occurrence number:
Query 1= 10
Query 2= 15
Query 3= 17
Is this possible or will I have to look the way I currently do, all separately?