Jump to content

Removing numbers from a set of numbers


thefollower

Recommended Posts

Hey guys quick question

 

Say theres a limit of number choices from 1 to 10. (not including 0)

 

Now these numbers are buyable so say some one buys number 7.

 

With a query or what ever is needed i need to find a way for the screen to then display:

 

1 2 3 4 5 6 8 9 10.

 

As you notice 7 is not missing.. but it could be any number and more than one number that has already been taken...

 

How can this be done in PHP and MYSQL or will it require some other script?

Link to comment
Share on other sites

Well i can tell you in a more complex way:

 

Say you want to buy a house in a street.. so you pick the street then it gets all houses in that street.. when it has got all these houses it will know what numbers are already taken... processing wise i can easily do a validation check.

But to stop users guessing which house numbers are not free by constantly inputting numbers..

 

I would rather it echo out the numbers that are still available from stripping out the numbers that are taken from the string then echo it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.