Let me try to explain. Here's your original set:
mID: 1 2 3 4 5 6 7 8 9 10
mOrder: 1 2 3 4 5 6 7 8 9 10
If you want to change the mOrder of #5 to 2, here's what you want to end up with:
mID: 1 2 3 4 5 6 7 8 9 10
mOrder: 1 3 4 5 2 6 7 8 9 10
So how do you get from the first set to the second set? First of all, #1 is unchanged. So anything with an mOrder less than the new mOrder (2) shouldn't be changed. Secondly, anything that is equal to or greater than the new mOrder (2), but LESS THAN the old mOrder (5) was increased by 1. That's the important part.
So, let's start expressing this in terms of variables. Let's call the original mOrder of #5 origMOrder (which is set equal to 5). Similarly, we'll call the new mOrder of #5 newMOrder (which is set equal to 2). We want to change the mOrder of #5 from origMOrder (5) to newMOrder (2). With me so far?
Now, back to our rules. "Anything that is equal to or greater than the new mOrder , but LESS THAN the old mOrder was increased by 1." So what should be increased? When the mOrder >= newMOrder AND mOrder < origMOrder. And you'll notice that that's almost in terms of a SQL query.
UPDATE displays SET mOrder=mOrder+1 WHERE mID <> '$mID' AND mOrder >= '$mOrder' AND mOrder < '$origMOrder'
I hope that it akes sense this time. I did my best to explain it.