0
$query = "SELECT COUNT(status) FROM $nomeTabela WHERE status=$numeroStatus AND nomePessoa='$nomePessoa'";
Can you optimize this? There is status of 0 to 10 (in this query I need to query only in the status of 1 to 10), I wanted to ignore the 0 for consultation to be even faster, there are a few more tips?
foreach ($arrayNomes as $nome) {
$status1 = retornaStatus(1,$nome,$nomeTabela);
$status2 = retornaStatus(2,$nome,$nomeTabela);
$GLOBALS['str'] .=
"<tr>".
'<td>'.$nome."</td>".
'<td>'.$status2."</td>".
'<td>'.$status1."</td>".
"<tr>";
}
echo $GLOBALS['str'];
Inside the function has this query posted above all.
I hadn’t thought of that, nice!
– Felipe Douradinho