richcleverley
MIS
Hi,
Not too sure how to do this but am certain that it should be easy.
I have a figure that a user inputs into a php script for how many people an apartment sleeps. What I want to do is select all properties in a database where this is so. Ok, easy enough for now. What I also need to do is to select apartments that may sleep 1 or 2 people more as well.
So, for example, if a person asks for apartments that sleep 3 people, it should return all apertments that sleep 3 and 4 people (already got this working), but if the person asks for an aprtment that sleeps 6 people, it should give all apartments that sleep 6,7 and 8 people and if they ask for an apartment that sleeps 10 people then it should return all apartments that have more than 10 in teh sleeps field.
Any ideas on how to do this?
Thanks,
Richard
Not too sure how to do this but am certain that it should be easy.
I have a figure that a user inputs into a php script for how many people an apartment sleeps. What I want to do is select all properties in a database where this is so. Ok, easy enough for now. What I also need to do is to select apartments that may sleep 1 or 2 people more as well.
So, for example, if a person asks for apartments that sleep 3 people, it should return all apertments that sleep 3 and 4 people (already got this working), but if the person asks for an aprtment that sleeps 6 people, it should give all apartments that sleep 6,7 and 8 people and if they ask for an apartment that sleeps 10 people then it should return all apartments that have more than 10 in teh sleeps field.
Any ideas on how to do this?
Thanks,
Richard