Prevent enrollment between specific beginnings and endings

0

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
asked by anonymous 20.03.2018 / 18:24

0 answers