database query help needed

Discussion in 'Databases' started by taarzan, Oct 26, 2009.

  1. #1
    thing is that I have a table in which i stored age range like that to make my query easy i inserted the age range in same table like this 2-5 and in other 2 colunms i have also taken the value in separate form of wht i mentioned above means like 2 in one column and 5 in the other is there any way that i make search for 4 year old person plz temme how to make that query from front end .
    i will provide from the front end 4 on ly how come i search for it what would be da query for it temme guys anyone.
     
    taarzan, Oct 26, 2009 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    SELECT columns FROM my_table WHERE range_start < 4 AND range_end > 4;
     
    jestep, Oct 26, 2009 IP
  3. taarzan

    taarzan Active Member

    Messages:
    240
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #3
    @jestep dude u didnt got my point thing is consider tht i have made all my filteration the last filteration is needed to be on age well as far as age is concerned it is stored like this in table in 3 columns 1column 3-5y 2 column 3 3rd column contains 5 its like that now i wanted to make search from front end thing is on runtime how am i suppose to match given age wid the age in databse cze it has no number 4 it has ranged stored in the way i mentioned above , anyone please help me in this regard the table contains ph values for different lab tests the last filteration is the age factor and im stuck at that part.
     
    taarzan, Oct 26, 2009 IP
  4. heavydev

    heavydev Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    you need to explain yourself with proper english and some sort of reasonable example. I am sure someone could help you if you made some sort of proper sense.

    From what I can GUESS you have a table that doesn't contain a value of 4 but will somehow bring results for records containing the value of 4.

    this is impossible.
     
    heavydev, Oct 26, 2009 IP
  5. taarzan

    taarzan Active Member

    Messages:
    240
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #5
    @heavydev dude nuffin is impossible in programming if u say that impossible word then I guess ur not imaginative anywayz all of those who replied i ty , I have sorted out the query myself and got the desired result .
     
    taarzan, Oct 28, 2009 IP
  6. heavydev

    heavydev Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    i have no idea what nuffin means.
     
    heavydev, Oct 30, 2009 IP