I am making a query to a table to see the maximum of the id's
existing ones, but the column of id
is of type varchar
therefore since the id
last record exceeded 99 then, it detects it as the maximum, so my idea was to do that The data type is changed from varchar
to integer when you do the query so that it takes the last one id
, but the truth is I don't know and I don't have the slightest idea what to do, if someone can help me, I appreciate it.
leave the query atMySQL
$select = "SELECT max(id_controlAsis) as id FROM control_asistencias";