I was under impression that declaration of char(4) can store only values of exact length of 4 characters. However I was able to insert empty string and strings of less characters than 4.
Is there some datatype that will only accept string of declared length? Strings with less characters should be refused. Or I'm left only with application logic to check desired string length?
Hi, I am a newbie in developing a website. i have tried to connect using mysqli conncetion
Here is my simple code.
// db.php code
//$con = mysqli_connect("localhost","root","","bakery"); ...