PDA

View Full Version : command problem


0810
11-24-2002, 05:35 AM
hi how are you doing?

I would like to know how to control age.

I have a searching friends function in mysite,so users can look for friends from mysite.

Let's say one is looking for male 18-20. How can I do mysql for it.

I have 18-35(Html select).

I did like this "select * from friends where age BETWEEN 18 and 35"

I can't control specific age. I tested but it comes 18-35 from my database.

How can I do it.

Could you help me out.

Thanks

bcarl314
11-25-2002, 11:20 AM
Try something like this,

SELECT * FROM friends WHERE age>18 AND age<20;