I have a slider that counts the bpm of a song. The range is from 15 to 300 bpm. It is connected to the MySql Database with php language and when I press an edit button I can change its value. For example from 50 to 55bpm. Table = users | Column = song_one.
<input value="<?php echo $this->data->song_one;?>" name="song_one" type="range" min="15" max="300" value="100" readonly>\
What I want is, if I change the value below 15 and above 300 to not accept it. How can I do this? I heard something about CONSTRAINT..
I tried this but it doesn't work..
ALTER TABLE users
ADD CONSTRAINT song_one CHECK (num >= 15 AND num <= 300);
Any information would be very helpful, thanks