0
I will 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];
}
also tried so:
while ( $temp = $atestados->fetch_assoc() ) {
echo $temp[max(protocolo)];
}
Ps. Random values for testing
You are using PDO or mysqli?
– rray