Cytat
Jak wybrac login z bazy danych gdzie wiek jest mniejszy lub rówy $wiekdo ale nie mniejszy lub równy niż $wiekod ?
http://www.mysql.com/doc/en/Comparison_Operators.html Cytat
expr BETWEEN min AND max
If expr is greater than or equal to min and expr is less than or equal to max, BETWEEN returns 1, otherwise it returns 0. This is equivalent to the expression (min <= expr AND expr <= max) if all the arguments are of the same type. Otherwise type conversion takes place, according to the rules above, but applied to all the three arguments. Note that before 4.0.5 arguments were converted to the type of expr instead.
Kod
SELECT * FROM my_table where WHERE (age BETWEEN $wiekod AND $wiekdo)