
January 2nd, 2004
10:13 PM
Mysql Query - Select Range...
Greetings,
im trying to select a certain range from a mysql database.
For example:
<?php
$result = mysql_query("SELECT * FROM $table WHERE name='$name' AND age BETWEEN 17 and 21") or die (mysql_error());
?>
gives me an error when i try to use that. Any help is appreciated.
Thanks in advance,
H.t

January 2nd, 2004
10:36 PM
can we see the error?
___________________
What was I talking about?

-proud user of FIREBIRD

January 2nd, 2004
10:58 PM
Hey,
the error doesnt really matter in this case, i just want to know if someone knows the correct syntax for this... once i have the correct syntax ill know what i need to do with it.
Thanks,
H.t

January 2nd, 2004
11:12 PM
16, staying Asian.
Status: Offline!
the two and's is confusing it.
(AND age BETWEEN 17 and 21) should work.
___________________


January 2nd, 2004
11:31 PM
Greetings,
Thanks Epyon, that works great.
Kind Regards,
H.t