I have a checkbook, in it I can enter the starting number and end of the block, that is from 1 to 10 ; 20 to 30 and etc., however I wanted to prevent registration between these codes.
Type, (since I have the example above) I could not register from 1 to 9 , 2 to 11 , 19 to 31 ... but could register from 11 to 19 , or from 31 to ...
Does anyone have an example with MySQL or PHP ? I already tried BETWEEN
, but it did not work. Thank you.
My table contains the fields:
- id
- cod-initial
- cod-end