Reputation: 23
so, i have a problem that doesn't really sure how to fix it, lets say i have :
<input type="number" id="input" name="input" class="form-control" placeholder="insert here" step=".01" required></br>
and i have a database to it witch is float. but every time i input with x.x0 the 0 in the end is always disappear.
any thought? thank you
Upvotes: 2
Views: 681
Reputation: 110
You can put 2 after the length of your field like FLOAT(15,2) for 2 digit after .
ALTER TABLE tablename MODIFY columnname FLOAT(15,2) ;
Upvotes: 0