1
I would like to know if it is possible to limit a maximum value to a field, e.g.: I want the maximum level number to be 200 in the mysql database. it is possible this through an update, in which way this could be done?
1
I would like to know if it is possible to limit a maximum value to a field, e.g.: I want the maximum level number to be 200 in the mysql database. it is possible this through an update, in which way this could be done?
-1
The best would be to limit the programming because the database will store the same data space as in your case a 3-digit number. so it is better to use the value restriction in the data entry mask.
Browser other questions tagged php mysql
You are not signed in. Login or sign up in order to post.
You can do this before sending to the bank, in PHP itself, using a simple IF
if ($valor <= 200) { mysqli_query('UPDATE ...'); } else { echo 'O tamanho ultrapassou o limite'; }
– Guilherme Nascimento
Constraint CHECK. https://dev.mysql.com/doc/refman/8.0/en/create-table-check-constraints.html
– anonimo
It didn’t work neither with me =/
– Player Beta