I have a MySql database, a student id is a varchar of 11, numbers are stored in this field but can start in zeros. for example 00000321. but it can also store 000321, but when consulting through jquery to PHP with id 0321 without the leading zeros, it shows any of the above or the first one it finds.
the code where the data is sent to php is the following:
$.post("llenadoAl.php", {"id":$(".id_alm").val()}, function(data)
to handle this class of codes varchar was created and can not be numeric because it would eliminate the zeros at the beginning of the id.
How can I make the query find the code exactly the same with the leading zeros?