I'll be brief:
When trying to work the values of a query that uses MAX, I get the error:
Use of undefined constant protocol - assumed 'field name'.
Select:
$atestados=$conect->query("select max(protocolo) from atestados");
Php working the return in HTML:
while ( $temp = $atestados->fetch_assoc() ) {
echo $temp[protocolo];
}
I also tried this:
while ( $temp = $atestados->fetch_assoc() ) {
echo $temp[max(protocolo)];
}
Ps. random values for testing