Select value higher/lower "than" AND same value?

Discussion in 'Databases' started by aronsthlm, Feb 22, 2009.

  1. #1
    I have a problem which I haven't been able to find any answers to online.
    I believe it's quite simple.

    I have a table with a "age"-row (with username age's), and I want to select and display every value higher than X (the age.). I use this string:

    $query = "SELECT xxx, yyy, zzz FROM mytable WHERE age > 20;

    When I do this, I only get values HIGHER THAN 20 , and what I want to do is run a query where I get every value that equals 20 OR higher.

    I suppose the query should be something like "> OR = " but that doesn't work.

    Thanks.
     
    aronsthlm, Feb 22, 2009 IP
  2. aronsthlm

    aronsthlm Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just solved this myself!

    The solution was simple, just write ">=" (without the ") instead of ">".

    (Ii case someone else finds this thread and wants to know.)
     
    aronsthlm, Feb 22, 2009 IP